Re: Finder's open event has properties? Cal?
Re: Finder's open event has properties? Cal?
- Subject: Re: Finder's open event has properties? Cal?
- From: Peter Fine <email@hidden>
- Date: Mon, 04 Dec 2000 12:47:29 -0500
on 12/3/00 9:35 PM, Paul Berkowitz at email@hidden wrote:
>
Hmmm. I always assumed that in
>
>
make new [object] with properties {record labels:values}
>
>
that the properties belonged to the new object, not to the make event. Don't
>
they?
>
>
But here:
>
>
tell app "Finder" to open application file id "MSIE" with properties
>
{visible:false}
>
>
the "false visible" doesn't belong to the application file. It belongs, sort
>
of (that is, it's not really invisible) to the process created by opening
>
the application file. But 'process' isn't mentioned anywhere. That's why I'm
>
wondering if it's a sort of coercion.
>
>
What exactly is getting its visible property made false here?
Paul,
This could get very circular. Syntactically, 'visible' is a property of
'file' in your code. Apparently, AppleScript knows to translate "open file
id "foo" with properties {visible:false}" into "launch app "foo"" if the
file is an app. Since your code compiles without complaint and performs its
trick at runtime, the analogy to a coercion seems apt. Whether it falls
within the strict definition of a coercion, however, I don't know. I thought
that when you coerced something you were transforming one data type into
another. That's not exactly what's happening here.
I would guess this is just another built-in undocumented dummy-saver. It
must have occurred to someone that anyone who wrote code like yours must be
trying to produce the equivalent of "launch app "foo"" and a safety net was
installed. It would be interesting to know if your code would avoid the
double tell under OS8. It would also be interesting to see if other
properties of the Finder's file object have dummy-savers attached.
Peter