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:29:50 +0300
So what is the best and by-the-book approach? Spotlight does it so smooth...
On Jul 9, 2010, at 12:12 AM, augusto callejas wrote:
> not sure how to prevent flickering, this entire approach is hack-ish anyhow :)
>
> On Jul 8, 2010, at 2:09 PM, Nava Carmon wrote:
>
>> 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
>
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