Mockey wrote about "allstatics":
M> You have to run it from the file in which the statics are defined.
That makes sense to me because statics are only available inside
the script which owns them -- and really that's not such bad news
for you Ted, because it could be a better plan to save a script's statics
every time the script quits. Saving all the statics at shutdown has a risk
of losing them if there's a PP crash or an unusual shutdown event such as
a power failure.
Although you don't need a shutdown routine to save all scripts'
statics, you do need a startup routine to restore them all,
because you don't need to restore them every time the script is run.
Suppose the scripts whose statics you wish to preserve are called
script1, script2, etc. and each static var is called static1, static2, etc.
________________________________
;; Your startup script should include the commands:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
etc
_____________________________________
;; add these lines to the end of script1.powerpro
@staticSave
error1=ini.set("c:\powerpro\store\scripts.ini","script1Statics","static1",static1)
error2=ini.set("c:\powerpro\store\scripts.ini","script1Statics","static2",static2)
if(error1 == "OK")
quit
*message Static vars from script1 were not saved.
quit
@staticRestore
static1=ini.get("c:\powerpro\store\scripts.ini","script1Statics","static1")
static2=ini.get("c:\powerpro\store\scripts.ini","script1Statics","static2")
if(ini_status == "OK")
quit
*message Static vars for script1 were not restored.
quit
_____________________________________
Every "Quit" command in script1 should be changed to "Jump staticSave"
except (of course) for the "quit" commands in the final two labelled
sections quoted above.
The @staticRestore section of each script is only ever run by your
PowerPro startup script.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/