Re: path name from Apple Event
Re: path name from Apple Event
- Subject: Re: path name from Apple Event
- From: James Spencer <email@hidden>
- Date: Sun, 14 Aug 2005 08:43:41 -0500
On Aug 14, 2005, at 7:28 AM, Gerriet M. Denkmann wrote:
My app gets an Apple Event: eventClass: 'aevt', eventID: 'odoc' .
NSAppleEventDescriptor *dio = [ event descriptorForKeyword:
keyDirectObject ];
This has the descriptorType 'list' and contains (among other data)
a path name.
But how do I get this path name as NSString ?
[ dio stringValue ] just returns nil.
Kind regards,
Gerriet.
__________________________________________
I'm not sure why you are doing this because normally Cocoa parses out
the open doc Apple Event and sends your application delegate an
application: openFiles: message. See http://developer.apple.com/
documentation/Cocoa/Conceptual/Scriptability/index.html
However, assuming you have a good reason for taking it over yourself,
the list doesn't contain a path name nor is it "among other data";
rather, the list contains one or more AE descriptors which contain
aliases for the files to be opened. You have to extract each of
these descriptors and get the data out of them. This being true, it
isn't the string value of the list that you want but rather the
string value of the individual elements of the list.
James P. Spencer
Rochester, MN
email@hidden
"Badges?? We don't need no stinkin badges!"
_______________________________________________
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