Re: Update NSMenuItem while displaying
Re: Update NSMenuItem while displaying
- Subject: Re: Update NSMenuItem while displaying
- From: Ricky Sharp <email@hidden>
- Date: Sat, 3 May 2008 07:50:46 -0500
On May 3, 2008, at 7:31 AM, Jere Gmail wrote:
I have a NSMenuItem int a NSStatusBarItem that displays the remaining
time of a timer. It is only updated when I'm not viewing the menu.
When I click in the menu, I can see in the debug console that no there
are no calls to the timer loop function.
How can I solve it?
When you're adding your timer to the run loop, I think you've only
specified the NSDefaultRunLoopMode. In addition to that, add the
timer with a second mode of NSEventTrackingRunLoopMode.
See addTimer:forMode:
If using 10.5 and later, there appears to be a new mode
(NSRunLoopCommonModes). I have not used that myself, but check the
docs to see if it may apply to you.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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