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 PROTECTED]
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to