Re: Trying to install kEventAppSystemUIModeChanged using NSAppleEventManager.
Re: Trying to install kEventAppSystemUIModeChanged using NSAppleEventManager.
- Subject: Re: Trying to install kEventAppSystemUIModeChanged using NSAppleEventManager.
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sun, 15 Jun 2008 14:10:35 +0200
Le 15 juin 08 à 13:25, Mohsan Khan a écrit :
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.
kEventAppSystemUIModeChanged is a carbon event not an AppleEvent.
You have to use InstallApplicationEventHandler to handle this event.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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