loss of access to stacks after "save as"

Mark Waddingham mark at livecode.com
Fri Nov 4 20:11:57 CET 2016


If you save a stack with a new filename, then that changes it filename property.

Therefore when you subsequently reference the stack by its old filename (in the delete) it will load the old stackfile, thus triggering the process that occurs when you try to load a stack into memory when one with the same name already exists.

After the save as you don't need to delete the stack by its old filename, as the stack is already loaded (you just saved it!).

Generally I would recommend not using filenames to reference stacks except to load them - once in memory you are better off using just the (short) name.

Hope this helps!

Mark.

Sent from my iPhone

> On 4 Nov 2016, at 18:06, Dr. Hawkins <dochawk at gmail.com> wrote:
> 
> I have a bmpVrsn routine to update the revision numbers of my various
> stacks.
> 
> Once the calculations are done, I
> 
> *close* stack stk
> 
> *save* stack stk as newFlNm
> 
> *delete* stack oldFlNm
> 
> So stk might be "rawForms", which was in file rawForms.161103a.livecode
> (oldFlNm), and now rawforms.161103b.livecode (newFlNm).
> 
> Immediately, I tend to get the message asking what to do with stack nwFlNm
> because oldFlNm is being loaded.
> 
> Some other updates are done after that--and can't access the new stack.
> E.g.,
> 
> send "boo!" to stack "rawForms"
> 
> 
> fails with no such stack found.
> 
> The first problem was present under 7; the second seems to be new to 8.
> 
> Any ideas?
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list