• 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: parent properties - limited access inside child's handlers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parent properties - limited access inside child's handlers?


  • Subject: Re: parent properties - limited access inside child's handlers?
  • From: Sun Real <email@hidden>
  • Date: Sat, 3 Feb 2001 16:53:19 +1100

email@hidden's message of 3/2/01 3:42 PM contained:

> property parent : load script file "WorkZone:testparent"
>
> my useparentprop()
>
> on useparentprop()
> display dialog a1
> end useparentprop
>
>This errors saying the variable a1 is not defined. If the properties and
>handlers of the parent script are treated just as if they were inline with
>the child script, then the useparentprop() handler should be aware of the
>property a1.

>Any ideas?

It seems to act like a top level variable declaration, i.e. that it needs
to be declared as global within the handler. This works here:

on useparentprop()
global a1
display dialog a1
end useparentprop

Not sure why it needs to be done this way though.

Cheers,

Richard Morton
-- Great Lies of the Music Business: "The place was packed"


  • Prev by Date: Re: Current hour and minute
  • Next by Date: Re: Can a script create an applet?
  • Previous by thread: parent properties - limited access inside child's handlers?
  • Next by thread: Re: parent properties - limited access inside child's handlers?
  • Index(es):
    • Date
    • Thread