Trying to install kEventAppSystemUIModeChanged using NSAppleEventManager.
Trying to install kEventAppSystemUIModeChanged using NSAppleEventManager.
- Subject: Trying to install kEventAppSystemUIModeChanged using NSAppleEventManager.
- From: Mohsan Khan <email@hidden>
- Date: Sun, 15 Jun 2008 13:25:36 +0200
Hi
I'm trying to to install kEventAppSystemUIModeChanged using
NSAppleEventManager, so that my app will know when the menubar & dock
is hidden i.e. some other app enters fullscreen mode.
I've tried entering fullscreen mode using VLC and Photoshop.
handleAppleEvent is never called because there is no log output.
Maybe something is missing or the event is never installed, I have no
idéa anymore - so its time to ask around.
- (void)handleAppleEvent: (NSAppleEventDescriptor *)event
withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
{
NSLog( @"handleAppleEvent called." );
}
- (void)applicationDidFinishLaunching: (NSNotification *)notification
{
NSAppleEventManager *eventManager = [NSAppleEventManager
sharedAppleEventManager];
[eventManager setEventHandler: self
andSelector: @selector( handleAppleEvent: withReplyEvent: )
forEventClass: kEventClassApplication
andEventID: (AEEventID)kEventAppSystemUIModeChanged];
}
Thanks._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden