• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: load script question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: load script question
  • Next by Date: AS from Classic to OS X Apps?
  • Previous by thread: Re: load script question
  • Next by thread: Re: load script question
  • Index(es):
    • Date
    • Thread