• 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
Re: path name from Apple Event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: path name from Apple Event


  • Subject: Re: path name from Apple Event
  • From: glenn andreas <email@hidden>
  • Date: Mon, 15 Aug 2005 09:42:18 -0500


On Aug 15, 2005, at 9:21 AM, Bill Monk wrote:


Gerriet M. Denkmann wrote:


Given an NSAppleEventDescriptor of typeAlias = 'alis' - how do I get
the path as an NSString?


Coerce typeAlias to typeFileURL, which is an HFS-style colon- delimited pathname.
The use CFURLto get a slash-delimited pathname as an NSString.

You could also (depending on what pieces of code you had handy) get the data from the descriptor, convert it to an AliasHandle, resolve the AliasHandle to FSRef, make a CFURL from there and get the NSString path. As stand alone code, it's a bit messier though (but if you already have alias->path code handy...)



Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Widgetarium | the quickest path to widgets

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: path name from Apple Event (From: Bill Monk <email@hidden>)

  • Prev by Date: Can't End A Process
  • Next by Date: -[NSSelectionBinder _didPresentModalAlert:contextInfo:]: selector not recognized
  • Previous by thread: Re: path name from Apple Event
  • Next by thread: Re: path name from Apple Event
  • Index(es):
    • Date
    • Thread