Re: load script question
Re: load script question
- Subject: Re: load script question
- From: Victor Yee <email@hidden>
- Date: Thu, 28 Jun 2001 16:42:15 -0400
On Thu, 28 Jun 2001 15:43:07 -0400, I wrote,
>
On Thu, 28 Jun 2001 11:02:52 -0700, Michelle Steiner wrote,
>
>
> property loaded_script : alias "Dora:set x"
>
> set foo to load script loaded_script
>
> x
>
>
Loading a script does not include running it. Add a "tell foo to run" and you should get your expected results.
That sounded rather abrupt... sorry. Telling foo to run will execute its code since "set x to 10" is in an implied run handler. Note that this will set the x of the main script. Without running foo, you get the "not defined" error since the main script's x hasn't been assigned a value.
Re-reading your post and thinking a little furthur, were you expecting x to be a property of foo? If so, then you would need to declare it as a property in the script to be loaded. Since foo doesn't have an x, you get the "Can't make some data..." error.
Victor