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: Paul Berkowitz <email@hidden>
- Date: Mon, 04 Dec 2000 11:11:22 -0800
On 12/4/00 9:47 AM, "Peter Fine" <email@hidden> wrote:
>
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.
Actually, 'application file id "xxxx"' is a special construct: the object
isn't the standard Finder file object, although it is a subset of it. So
the "dummy-saver" coercion may be restricted to this use.
>
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.
>
I'm not sure that "safety net" is the right term, since i don't know any
other "smart" way to do "launch" with the Finder when you don't know the app
name. It seems to be the only way to do it. Why double tell? How does that
come into it?
The Finder seems to have a lot of these "dummy-savers". This is a nicer one
than usual. (I don't always care for the ones that change file names without
telling you, rather than erroring, for example.) I'd even go so far as to
call this one a "smart saver".
--
Paul Berkowitz