Re: parent properties - limited access inside child's handlers?
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"