• 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: Who's launching me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Who's launching me?


  • Subject: Re: Who's launching me?
  • From: Camillo Lugaresi <email@hidden>
  • Date: Thu, 16 Feb 2006 00:33:45 +0100

On 15/feb/06, at 18:20, Greg Robbins wrote:

- (void)myHandleOpenDocuments:(NSAppleEventDescriptor*)odocEvent
               withReplyEvent:(NSAppleEventDescriptor*)replyEvent {

  NSAppleEventDescriptor *theAEAddrDesc
    = [odocEvent attributeDescriptorForKeyword:keyAddressAttr];

  // the keyAddressAttr may be a ProcessSerialNumber or an OSType;
  // look for either

Actually, valid types for keyAddressAttr are typeApplSignature, typeSessionID, typeProcessSerialNumber, typeApplicationBundleID, typeMachPort, typeKernelProcessID, typeApplicationURL, and maybe others.


However, these are for specifying the target of an AppleEvent. When receiving an AppleEvent from a Carbon or Cocoa program running on the local machine, I believe that the address of the sender is always given as a PSN or as something that can be coerced to it. You should not need to check for typeApplSignature or any of the other types, although you should properly handle the case when you cannot obtain a PSN for the sender.

Camillo

_______________________________________________
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: Who's launching me? (From: Greg Robbins <email@hidden>)

  • Prev by Date: Re: File System changes notifications
  • Next by Date: Re: Strange file system behavior
  • Previous by thread: Re: Who's launching me?
  • Next by thread: Re: Force an Application to crash : possible ?
  • Index(es):
    • Date
    • Thread