Re: path name from Apple Event
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