data loss in a standalone... a bug?

Mark Smith mark at maseurope.net
Mon Jul 16 19:33:48 EDT 2007


Also, (though I wouldn't think it's the cause of the problem), you  
don't need to open the stack, this should work:
	
   set the customproperties["allDataProps"] of stack whichFile \
       to the customproperties["allDataProps"] of stack "dataTemplate"
   save stack whichFile
   delete stack whichFile -- does not delete! simply removes from  
memory.

Best,

Mark


On 16 Jul 2007, at 22:35, Dave Cragg wrote:

>
> On 16 Jul 2007, at 21:28, Michael Binder wrote:
>> When I save data to an existing data file, I use this code:
>>   -- the variable 'whichFile' contains the file path of the
>>   -- user's data file
>>   open invisible stack whichFile
>>   set the custompropertyset of stack whichFile to "allDataProps"
>>   set the customproperties["allDataProps"] of stack whichFile \
>>       to the customproperties["allDataProps"] of stack "dataTemplate"
>>   save stack whichFile
>>   close stack whichFile  --the destroystack of stack whichFile is  
>> true
>
>
> I'm assuming the data isn't saved properly when you do the above.  
> Is that right?
>
> One possible problem is the following two lines:
>
>    set the custompropertyset of stack whichFile to "allDataProps"
>    set the customproperties["allDataProps"] of stack whichFile  
> to ......
>
> I don't think you need the first line, and it could be the cause of  
> the problem (just guessing). The syntax of the second line (set the  
> customproperties["allDataProps"]) is a way of addressing a custom  
> property set without needing to specifically set it. The following  
> are equivalnet:
>
> 1.    set the customproperties["allDataProps"] of stack whichFile  
> to ......
>
> 2.    set the custompropertyset of stack whichFile to "allDataProps"
>        set the customproperties of stack whichFile to ......
>
> Cheers
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list