• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Update NSMenuItem while displaying
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Update NSMenuItem while displaying
      • From: "Jere Gmail" <email@hidden>
References: 
 >Update NSMenuItem while displaying (From: "Jere Gmail" <email@hidden>)

  • Prev by Date: Update NSMenuItem while displaying
  • Next by Date: Re: drawing in a separate thread
  • Previous by thread: Update NSMenuItem while displaying
  • Next by thread: Re: Update NSMenuItem while displaying
  • Index(es):
    • Date
    • Thread