on restoreMyStuff
But isn't your restoreMyStuff handler going to have to go into the file
you're navigating to? You said you didn't want to touch the code in this
file, and you shouldn't have to:
-- parent script "global.saver.class"
property myVarList
property myRestoreEvent
on new me, lVars, anEvent
-- example call:
-- t = script("global.saver.class").new([#gPreserved: gPreserved,
#gSafe: gSafe], #startMovie)
myVarList = lVars
myRestoreEvent = anEvent
t = timeout().new("globalSaver", 0, #dummy, me)
t.persistent = TRUE
end
on prepareMovie me, aTimeout
if (myRestoreEvent = #prepareMovie) then
me.mRestoreGlobals(aTimeout)
end if
end
on startMovie me, aTimeout
if (myRestoreEvent = #startMovie) then
me.mRestoreGlobals(aTimeout)
end if
end
on prepareFrame me, aTimeout
if (voidP(myRestoreEvent) OR (myRestoreEvent = #prepareFrame)) then
me.mRestoreGlobals(aTimeout)
end if
end
on exitFrame me, aTimeout
if (myRestoreEvent = #exitFrame) then
me.mRestoreGlobals(aTimeout)
end if
end
on mRestoreGlobals me, tTimeout
tTimeout.forget()
repeat with p = 1 to count(myVarList)
(the globals)[myVarList.getPropAt(p)] = myVarList[p]
end repeat
end
[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
lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]