Re: Can someone explain this?
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