Re: setting focus on NSSearchField in status bar menu item
Re: setting focus on NSSearchField in status bar menu item
- Subject: Re: setting focus on NSSearchField in status bar menu item
- From: Nava Carmon <email@hidden>
- Date: Fri, 09 Jul 2010 00:09:44 +0300
Tried it,
In awakwFromNib I added:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showPopupMenu:) name:NSApplicationDidBecomeActiveNotification object:nil];
added a function:
- (void)showPopupMenu:(NSNotification *)notification
{
[statusItem popUpStatusItemMenu:statusMenu];
}
and in menuWillOpen:
- (void)menuWillOpen:(NSMenu*)menu
{
if (![NSApp isActive]) {
[NSApp activateIgnoringOtherApps:YES];
}
}
It's better now and the menu stays after a slight flickering... It highlights the title for a sec and unhighlights it. How to get rid of flickering at all?
Thank you very much!
On Jul 8, 2010, at 11:59 PM, augusto callejas wrote:
> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showPopupMenu:) name:NSApplicationDidBecomeActiveNotification object:nil]
Nava Carmon
email@hidden
"Think good and it will be good!"
_______________________________________________
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