data loss in a standalone... a bug?

J. Landman Gay jacque at hyperactivesw.com
Mon Jul 16 16:06:11 CDT 2007


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
> 
> In the big complex app that I have been working on, I do have a 
> workaround.  I simply repeat this line twice:
> set the customproperties["allDataProps"] of stack whichFile \
>       to the customproperties["allDataProps"] of stack "dataTemplate"
> 
> I have no idea why the workaround works.  One source of distress to me 
> is that the workaround DOES NOT work in the demonstration stack.

I haven't had any problems with custom properties, so it's hard to say. 
Is the short name of your template stack the same as the short name of 
the data stack that was cloned? If so, the engine may be confused about 
which stack it should be putting the data into. If you aren't already 
doing it, name your data stack something different from the template.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list