Re: slash path to alias
Re: slash path to alias
- Subject: Re: slash path to alias
- From: Luther Fuller <email@hidden>
- Date: Thu, 31 Jul 2008 10:18:11 -0500
On Jul 31, 2008, at 9:36 AM, Axel Luttgens wrote:
Le 29 juil. 08 à 19:56, Luther Fuller a écrit :
[...]
In either case, in both OSs, I get the proper colon delimited and
terminated string, without testing the last character. I'm
wondering if the colon terminal test is even necessary. [...]
Yes, you're right: the way you devised your code, the test isn't
needed.
In fact, there is something at work that I never noticed.
As a reminder, one of the thread's theme went around the fact that,
in Tiger, Mail returns a string containing the posix path to an
account directory, instead of a file reference as stated in the
dictionary.
Moreover, that path comes without a trailing slash.
So, assuming the "Applications" folder exists, let's try this one:
set X to "/Applications"
(POSIX file X) as text
--> "BootDisk:Applications"
It was experimenting with this sort of path that convinced me that the
terminal colon test was necessary.
tell application "Mail" to get (POSIX file X) as text
--> "BootDisk:Applications:"
But I couldn't find any case from Mail that needed a terminal colon. I
retained the terminal colon test just to be safe, but I think it was
unnecessary. (It's only one line of code.)
The above is true in both Tiger and Leopard; moreover, it holds for
applications such as TextEdit, Safari, iTunes... as well.
Such discrepancies might prove somewhat problematic, if only from a
logical point of view.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden