Re: Re: Parents/Child Scripts
Re: Re: Parents/Child Scripts
- Subject: Re: Re: Parents/Child Scripts
- From: Lachlan Deck <email@hidden>
- Date: Tue, 14 May 2002 10:43:58 +1000
Hi there,
my question regarding this topic is whether AS has the ability to
actually hide it's parameters?
i.e., can a property be defined as protected or something similar?
It seems to me that any property defined is open to mischief...
e.g.,
script Elizabeth
property HowManyTimes : 0
to sayHello to someone
set HowManyTimes to HowManyTimes + 1
return "Hello " & someone
end sayHello
end script
script ChildOfElizabeth
property parent : Elizabeth
on sayHello to someone
if my HowManyTimes > 3 then
return "No, I'm tired of saying hello."
else
continue sayHello to someone
end if
end sayHello
end script
repeat with i from 1 to 5
tell Elizabeth to sayHello to "Matt"
display dialog the result
display dialog (HowManyTimes of Elizabeth)
(*this next line isn't desirable but it is
possible and produces a later error *)
set (HowManyTimes of Elizabeth) to "Two"
tell ChildOfElizabeth to sayHello to "Bob"
display dialog the result
end repeat
with regards,
--
Lachlan Deck
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.