I am using notification to get control when menu items clicked...
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(menuChangedItem:) name:NSMenuWillSendActionNotification object:nil];
}
-(void) menuChangedItem :(NSNotification *)inSender
{
NSDictionary *dict = [inSender userInfo];
NSMenu *menu = [dict objectForKey:@"MenuItem"];
NSLog(@"Testing");
}
In menuChangedItem method, is it possible to know which menu item is clicked(about, quit ,hideall etc).
Thanks in advance.