• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
alias to string deprecated, or bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Fwd: non-error error with posix file
  • Next by Date: Re: How do you write an OSAX?
  • Previous by thread: Re: Entourage : Returning info from multiple new messages
  • Next by thread: Re: alias to string deprecated, or bug?
  • Index(es):
    • Date
    • Thread