Re: Can someone explain this?
Re: Can someone explain this?
- Subject: Re: Can someone explain this?
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 17 Dec 2000 11:10:42 -0800
On 12/17/00 10:44 AM, "Michelle Steiner" <email@hidden> wrote:
>
I entered the following lines in a script.
>
>
Set2be with to
>
set not2be to false
>
>
they compliled as
>
>
Set2be with to
>
set not2be to false
>
>
Of course, there was an error when I tried to run the script.
I'm assuming you really meant to say that you entered:
Set2be to true
set not2be to false
and they compiled to
Set2be with to
set not2be to false
since that's what happens, and makes more sense for you to be writing the
list about it .
Since you omitted to leave a space between 'Set' and '2be' in the first
line, you got an (undefined so far) variable 'Set2be'. So you were actually
declaring that 'Set2be to' is true. Have you noticed before that when you
use the booleans true and false after a property (as usually defined in a
dictionary) , AppleScript compiles them to the English-like 'with' and
'without' followed by the property? 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.
Anyone?
--
Paul Berkowitz