Apple Events In Cocoa
Apple Events In Cocoa
- Subject: Apple Events In Cocoa
- From: Brendan Younger <email@hidden>
- Date: Sat, 16 Jun 2001 22:31:25 -0500
I've been having some problems with implementing Apple Events in my
program. Quite frankly, I don't know where to start. Trying to learn
it from the old IM:IAC is difficult since it has very little example
code and it recommends having Apple Event Registry: Standard Suites
which I can't find. As far as Cocoa goes, it looks like I should be
able to call some methods directly (?) such as NSApplication's -
(NSArray*)orderedWindows: (in NSApplicationScripting.h), but there is no
sample code and the only way I can find to send an AppleEvent is with
NSAppleEventManager's -dispatchRawEvent: which gets me nowhere since I
might as well be using Carbon and AESend if I need raw AppleEvents.
Specifically, I'm looking for the same sort of functionality in the
Dock's contextual menus. Events like 'quit', 'rapp', and however one
makes a window frontmost. I've looked at some of the sample code for
AppleEvents and about the only non-finder related event used is 'quit'.
If anyone knows of a good beginner's tutorial or a good reference for
the core event class, please point me in the right direction. Thanks.
Brendan Younger