Re: GraphicConverter: save in alias, alias ignored
Re: GraphicConverter: save in alias, alias ignored
- Subject: Re: GraphicConverter: save in alias, alias ignored
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 02 Mar 2004 09:48:57 -0800
On 3/2/04 9:37 AM, I wrote:
>
> How'd you happen to think of saving into a plain file path?
>
>
That has always worked - AppleScript does the coercion itself. In some
>
apps, including Outlook Express and Entourage which I script a lot, it's
>
actually required, since these apps have their own 'file' keyword meaning
>
something completely different, which takes precedence over AppleScript's
>
own 'file' keyword. Saving to the filepath has always worked there - and
>
the AppleScript coercion to file specification was transferred (or
>
maintained) in OS X - AS 1.6 to be precise, when fileURL took over here.
>
I forgot to mention that the Apple-authorized use of the type 'alias' for
specifying the [in] parameter of save has always been wrong, wrong, wrong.
Back in OS 7, 8, 9 many people naturally assumed that meant the containing
folder - and you could actually use it that way, since another coercion
would allow it. But then you could never be certain what the file path to
your resulting file would be - the Finder (or file system, maybe) - could
adjust it to avoid duplicates, overwrites, etc. That container-coercion does
not work in OS X. You need to give the file path of the file you want. 99%
of the time, you want to create a new file, not overwrite an old one, so
'alias' is just plain wrong. (For all I know, the "coercion" consists in
creating the alias first, although that would seem a bit specious to me - a
type specified that _has_ to be coerced.)
In the early days of OS X, some of the Apple apps actually used 'Unicode
text' as the type for the [in] parameter. Of course some of them (TextEdit)
also required a POSIX path back then! (OS 10.0, 10.1.) I thought the use of
Unicode text was helpful and honest, leading you to doing the right thing -
even if it glided over the fact that a coercion would take pace. At least it
works. Now they've all gone back to using 'alias' in their Dictionaries,
which is not only a coercion, but doesn't work. I don't understand why the
Standard Suite still insists that the [in] parameter of 'save' requires
'alias'. That's just plain wrong.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.