alias to string deprecated, or bug?
alias to string deprecated, or bug?
- Subject: alias to string deprecated, or bug?
- From: Matt Neuburg <email@hidden>
- Date: Mon, 15 Aug 2005 18:42:10 -0700
I have a folder whose name is Ancient Greek, and so it contains some
Unicode-only character. If I do this:
tell application "Finder"
folder -1 as alias
end tell
result as Unicode text -- (or, "as string")
I get a runtime error. Similarly:
tell application "Finder"
folder -1 as Unicode text
end tell
result as alias
That gets a runtime error too.
However, this works:
tell application "Finder"
folder -1 as Unicode text
end tell
alias result
And this works:
tell application "Finder"
folder -1 as alias
end tell
POSIX path of result
POSIX file result
result as Unicode text
So, to sum up, coercion between string and alias can fail, but forming an
alias specifier works, and getting a posix path works.
My question is: is this a bug in the alias coercion mechanism, or is the
alias coercion mechanism basically deprecated and dying? Should I be telling
readers not to coerce to and from an alias at all? Or is this just a
temporary glitch that might be fixed in a future version of AppleScript? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden