Re: Who's launching me?
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