Problems with "load script"
Problems with "load script"
- Subject: Problems with "load script"
- From: Helmut Fuchs <email@hidden>
- Date: Mon, 28 Jan 2002 14:33:07 +0100
Hi all,
I have written a rather large Application with FaceSpan und
ScriptDebugger which is used to modify data that's input via XML and
to output it into QuarkXPress.
Now I wanted to add a functionality to save the state of the
application - and am running into the strangest things.
Part of my code looks something like this:
global gTCMS_TechspecContent_Raw
on TCMS_MergeFromSavedState()
local lStateObj
copy (load script (choose file)) to lStateObj
if gTCMS_TechspecContent_Raw=0 then
...
end if
end TCMS_MergeFromSavedState
<<<<
After the script object is loaded and the copy executed my global
variable becomes "not defined" and an error is raised on the if-line.
But I'm sure it was defined! And if I comment out the load script
altogether I can see it _really_ was defined.
And while playing around with "load script" some strange crashes
occured when I tried to work with large data structures loaded with
with it. My PowerBook G3 even refused to reboot once - I had to
remove power cord and batteries to make it start up again.
Is there anything I don't know about "load script" which I should?
Does it do something to my symbol tables? Should I treat the data
loaded by "load script" in some way (like passing it thru "run
script" to clean it up, like we do for <<class usrf>> hacking)?
Or are there known but undocumented bugs?
How would I save large data structures and avoid "load script" and
"store script" altogether?
Thanks for any advice,
Helmut