When is a stack "really" loaded?

Len Morgan len-morgan at crcom.net
Mon Mar 24 12:45:33 EDT 2008

I'm trying to go through a list of stack files (whos' names and versions 
come from a text file on the update server) to see if they need to be 
updated.  If there is a newer version, I copy the file from the update 
server to the local computer.  I'm using:

put the cstkVersion of stack tCurrentStack into tLocalStackVersion

That command is the first time I reference any of the stack files as the 
program starts up.  My understanding is that by reference a custom 
property in the local stack, it is "loaded."  These stacks do NOT 
however show up in the Application Browser.

Since  (I assume) the stack get loaded, I set a flag if any of the 
stacks are copied (updated) from the server and then require the user to 
restart the program.  The second time, since all of the local file 
versions should now much the server version, it goes through the same 
process but since no stacks are updated this time, the program continues 
to run "normally."

So my question is: Does the stack really get loaded?  If so, can it be 
unloaded and reloaded so that the new version will be used instead?  I 
understand that if the version of the startup stack changes (called by 
StackRunner), I'll have to restart, but that stack is rarely changed.

Would I be better off just copying the files from the server every time 
the user starts up the program whether they are changed or not?  Can I 
use a URL stack file name instead of a local one?  Since I'm not 
explicitly loading the stacks, I'm not sure if the checking of the 
custom property has the same effect as "start using...." or "go stack 
..."  One can be used with a URL, the other can't.


len morgan

More information about the Use-livecode mailing list