• 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: 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


References: 
 >path name from Apple Event (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Core Data and multiple NIBs: how to share the managedObjectContext?
  • Next by Date: Re: Calculated Field examples for Core Data
  • Previous by thread: path name from Apple Event
  • Next by thread: Re: path name from Apple Event
  • Index(es):
    • Date
    • Thread