• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Re: Parents/Child Scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Parents/Child Scripts
      • From: Andy Wylie <email@hidden>
  • Prev by Date: Re: Parents/Child Scripts
  • Next by Date: Re: Appending a list to a list and getting one list.
  • Previous by thread: Re: Parents/Child Scripts
  • Next by thread: Re: Parents/Child Scripts
  • Index(es):
    • Date
    • Thread