• 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: Can someone explain this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can someone explain this?


  • Subject: Re: Can someone explain this?
  • From: Nigel Garvey <email@hidden>
  • Date: Sun, 17 Dec 2000 22:42:27 +0000

Paul Berkowitz wrote on Sun, 17 Dec 2000 11:10:42 -0800:

>So I think what's happening here is that
>AS is understanding this as a so
>
> Set2be [unknown event] to [boolean parameter of the event] true
>
>compiling to:
>
> Set2be [unknown event] with to
>
>which, as you say, errors in execution. Interestingly, it says "<<script>>
>doesn't understand the Set2be message" rather than "undefined variable", so
>I think that shows it thinks that 'Set2be' is supposed to be an event, not a
>variable, due to the boolean parameter syntax.

'With' and 'without' are also ways of addressing the 'given' parameter of
a labelled parameter handler. <<script>> often doesn't "understand" a
message when it thinks it's a call to a non-existant handler. You still
get an error in the present instance even if there *is* a handler,
because 'to' isn't an allowable label for a 'given', but if you change it
to something else:

Set2be with aardvark

on Set2be given aardvark:truth
if truth then
beep
else
beep 2
end if
end Set2be

Change 'with' to 'without' to confirm.

NG


  • Prev by Date: Re: What's an FSS? (newbie)
  • Next by Date: Booleans in positional parameter sub routines
  • Previous by thread: Re: Can someone explain this?
  • Next by thread: Re: Can someone explain this?
  • Index(es):
    • Date
    • Thread