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: "Arthur J Knapp" <email@hidden>
- Date: Sat, 03 Feb 2001 14:15:34 -0500
>
From: email@hidden
>
Date: Fri, 2 Feb 2001 23:42:37 EST
>
Subject: parent properties - limited access inside child's handlers?
>
property a1: "hello"
>
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.
>
Any ideas?
The keyword "my" or "of me" is used to refer to inherited
properties, (otherwise, AppleScript assumes a local variable/
property).
Using the philosophy that a confusing example is easier to
post than a clear explaination:
-- script "basic.lib"
--
property ver : "Basic Lib 1.0"
on SayVer()
display dialog "Basic Lib: ver = " & ver
display dialog "Basic Lib: my ver = " & my ver
end SayVer
property UniqueToParent : 3.14159
------------------------------
-- script "main"
--
property parent : load script "basic.lib"
property ver : "Main 1.0"
on SayVer()
display dialog "Main: ver = " & ver
display dialog "Main: my ver = " & my ver
continue SayVer() -- pass to parent
end SayVer
SayVer()
-- display dialog UniqueToParent -- > error
display dialog my UniqueToParent
------------------------------
<
http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters
/AppleScriptLangGuide/index.html>
--
{
Arthur J Knapp, of STELLARViSIONs ;
http://www.STELLARViSIONs.com ;
mailto:email@hidden ;
"...well the rain falls down
without my help, I'm afraid
and my lawn gets wet,
though I withheld my consent..."
}