Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: load script question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: load script question



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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.