parent properties - limited access inside child's handlers?
parent properties - limited access inside child's handlers?
- Subject: parent properties - limited access inside child's handlers?
- From: email@hidden
- Date: Fri, 2 Feb 2001 23:42:37 EST
I was fascinated to learn of the "parent" property, so I'm testing it. I
created a compiled script:
property a1: "hello"
and saved it to disk. I then created a script in script editor...
property parent : load script file "WorkZone:testparent"
display dialog a1
This works as expected - the dialog "hello" is displayed. I then created this
script:
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.
Incidentally, the child's handler's are correctly aware of the parent's
handler's, just not the parent's properties.
Any ideas?
Jeff Baumann
email@hidden
www.linkedresources.com
Pillage first, then burn.