Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Nava Carmon
Can you point me on this thread please? Thanks a lot! On Jul 9, 2010, at 12:36 AM, Kyle Sluder wrote: > On Thu, Jul 8, 2010 at 2:29 PM, Nava Carmon wrote: >> So what is the best and by-the-book approach? Spotlight does it so smooth... > > As was discussed in the other thread on this topic, don

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Eric Schlegel
On Jul 8, 2010, at 2:29 PM, Nava Carmon wrote: > So what is the best and by-the-book approach? Spotlight does it so smooth... Spotlight presents its own window and does not use a menu at all. -eric ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Kyle Sluder
On Thu, Jul 8, 2010 at 2:29 PM, Nava Carmon wrote: > So what is the best and by-the-book approach? Spotlight does it so smooth... As was discussed in the other thread on this topic, don't use an NSMenu for this. --Kyle Sluder ___ Cocoa-dev mailing lis

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Nava Carmon
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 awakwFr

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread augusto callejas
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:NSApplicationDid

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Nava Carmon
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 popUpSt

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread augusto callejas
try delaying displaying the menu through a notification: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showPopupMenu:) name:NSApplicationDidBecomeActiveNotification object:nil] On Jul 8, 2010, at 1:53 PM, Nava Carmon wrote: > Hi, thank you for answering. > > I do

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Nava Carmon
Hi, thank you for answering. I do the following: - (void) menuWillOpen:(NSMenu *)menu { > [statusItem popUpStatusItemMenu: menu]; > [NSApp activateIgnoringOtherApps:YES]; } It brings the process to the front, but on first click the menu doesn't stay open, so i have to click it again to show u

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread augusto callejas
when you click again on your status menu, try making your app the active app: [NSApp activateIgnoringOtherApps:YES]; augusto. On Jul 8, 2010, at 12:26 PM, Nava Carmon wrote: > Can somebody answer this please? > > On Jul 8, 2010, at 8:41 AM, Nava Carmon wrote: > >> Hi, >> >> I added a custom

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread vincent habchi
Le 8 juil. 2010 à 21:26, Nava Carmon a écrit : > Can somebody answer this please? > >> I added a custom view with a NSSearchField as a first menu item to a status >> bar menu. When I run the application from debugger I can click and write in >> the NSSearchField. After I go to another applicati

Re: setting focus on NSSearchField in status bar menu item

2010-07-08 Thread Nava Carmon
Can somebody answer this please? On Jul 8, 2010, at 8:41 AM, Nava Carmon wrote: > Hi, > > I added a custom view with a NSSearchField as a first menu item to a status > bar menu. When I run the application from debugger I can click and write in > the NSSearchField. After I go to another applica

setting focus on NSSearchField in status bar menu item

2010-07-07 Thread Nava Carmon
Hi, I added a custom view with a NSSearchField as a first menu item to a status bar menu. When I run the application from debugger I can click and write in the NSSearchField. After I go to another application, make it front and click again on my status menu, the NSSearchField shows, but it's di