Re: POSIX path in Lion
Re: POSIX path in Lion
- Subject: Re: POSIX path in Lion
- From: Axel Luttgens <email@hidden>
- Date: Thu, 18 Aug 2011 09:13:41 +0200
Le 17 août 2011 à 16:09, Luther Fuller a écrit :
> On Aug 17, 2011, at 8:46 AM, Shane Stanley wrote:
>
>> On Aug 17, 2011, at 10:08 PM, Luther Fuller wrote:
>>>
>>> It's an alias. No doubt.
>>
>> Where did it come from? Have you tried adding a line "log class of fileAlias"?
>
> No. But I tried looking at the code that created the alias.
> I said ...
>
> some file of entire contents of the result whose name is msgFileName
> return the result
>
> but should have said ...
>
> some file of entire contents of the result whose name is msgFileName
> return the result as alias
>
> Perhaps this is the source of the problem.
> Unfortunately, it will be late today before I can test this.
So, we had to guess…
The above provides some info that should have appeared in your very first message: given the "entire contents" locution, one may infer that fileAlias is a Finder reference.
And a Finder reference doesn't have a "POSIX path" property.
So, unless the Finder had suddenly, starting with Lion, dropped some previously implemented implicit reference -> alias (or file) coercion [1], the error was to be expected.
Once again, this illustrates the virtues of the search for minimal yet complete test cases, as for example:
tell application "Finder"
set fileAlias to some file of desktop
POSIX path of fileAlias
--> error -1700
end tell
Unless I'm wrong, there's nothing wrong with Lion in this precise case… ;-)
Axel
[1] Or, at the very least, a reference -> text coercion, since your "fix" was to coerce fileAlias as text, and since POSIX path may, in an undocumented way, be applied to strings... _______________________________________________
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