Language Guide

CHAPTER 9
Script Objects
Inheritance and Delegation 279
Note
The reserved word my in the statement if my
HowManyTimes > 10 in the previous example is required
to indicate that HowManyTimes is a property of the script
object. Without the word my, AppleScript assumes that
HowManyTimes is an undefined local variable.
A Continue statement can change the parameters of a command before
delegating it. For example, suppose the following script object is defined in
the same script as the preceding example. The first Continue statement changes
the direct parameter of the sayHello command from "Bill" to "William".
It does this by specifying the value "William" instead of the parameter
variable someone.
script AnotherChildOfElizabeth
property parent : Elizabeth
on sayHello to someone
if someone = "Bill" then
continue sayHello to "William"
else
continue sayHello to someone
end if
end sayHello
end script
If you override a parent’s handler in this manner, the reserved words me and
my in the parent’s handler no longer refer to the parent, as demonstrated in the
example that follows.
script Hugh
on identify()
me
end identify
end script