At 12:23 AM +0200 6/17/05, Valentin Schmidt wrote:
Hi Cole,

'version' does not get zapped when all other globals are cleared.
You could
save all your globals (including version itself) in a property list,
set 'version' to the property list, call clearGlobals, then restore
everything
from your property list.

That's really a brilliant idea! I had to try if it works, and yes, it does! Here the code I used:

I had no idea that was writeable! I'll keep that in mind, but the client movie may reference that global.

The static movie script is tempting. But being scoped to the current movie, it evaporates as soon as you leave that movie (unless I'm missing something).

I think I'll try a persistent timeout object first. I only need to preserve one global, so it won't take much. I probably try something like:

global gLLSprops

on saveMyStuff
  tMyStuff = timeOut("lls demo props").new(0, #unused, gLLSprops)
  tMyStuff.persistent = TRUE
end

on restoreMyStuff
  if getPos(the timeoutlist, timeOut("lls demo props")) > 0 then
    tMyStuff = timeOut("lls demo props")
    gLLSprops = tMyStuff.target
    forget(tMyStuff)
  end if
end

Thanks for all the feedback!

--
Cole

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to