Re: Storing script objects
Re: Storing script objects
- Subject: Re: Storing script objects
- From: Richard 23 <email@hidden>
- Date: Fri, 12 Jan 2001 01:02:36 -0800
>
Hi!
>
>
I want to build some script objects based on FileMaker data and then
>
use Store Script to write a file that can be used by other scripts.
>
>
When I change properties of the script they don't get written. For example:
>
--------
>
script x
>
property y : {}
>
end script
>
>
set x's y to {1, 2, 3}
>
store script x in ((path to desktop) as text) & "script file" with replacing
>
------
actually they do, but the source isn't updated. It's a good idea to place
a comment in your script saying not to modify, compile and resave or else
data will be lost.
try
load script x
return x's y
BONUS DECEPTION PLOY:
this is effective against less gifted nosy neighbors:
property Prevent: run script "error number -128"
the script will refuse to compile, only silently...
no compile means no save with replace... crafty, eh?
>
When I read the file, property y is set to the original {}.
>
>
Any ideas?
I have on occasion found it useful to refresh the source but it's
an involved process for which I haven't received patents yet... 8)
>
-John