Re: NSAppleEventManager details ??
Re: NSAppleEventManager details ??
- Subject: Re: NSAppleEventManager details ??
- From: Brian Webster <email@hidden>
- Date: Fri, 14 Mar 2003 15:17:40 -0600
The selector specifies the method that you want called on the handler
when receiving the Apple Event. For example, say you have an object
you want to handle open events:
@implementation SomeController
- (id)init
{
self = [super init];
//init other stuff
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self
andSelector:@selector(handleOpenEvent:reply:)
forEventClass:kCoreEventClass
andEventID:kAEOpenDocuments];
return self;
}
- (void)handleOpenEvent:(NSAppleEventDescriptor*)event
reply:(NSAppleEventDescriptor*)reply
{
//handle the event
}
@end
On Friday, March 14, 2003, at 02:07 PM,
email@hidden wrote:
Hi Cocoa folks,
Due diligence having been attempted (various searches yielding nil)
prior to writing, here's a note to ask if anyone knows where it is
explained what is the significance of the arguments in the
NSAppleEventManager function:
- (void)setEventHandler:(id)handler
andSelector:(SEL)sel <--- what's
this ?
forEventClass:(AEEventClass)eventClass
andEventID:(AEEventID)eventID
There're about 2 sentences written in support of this component. Does
anyone know of any sample code floating around that makes use of this
object? It should be simple - but the details are lacking.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.