Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6003575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:08:27+00:00 2026-05-23T01:08:27+00:00

I have an NSMenuItem that I need to update to show a progress (like

  • 0

I have an NSMenuItem that I need to update to show a progress (like Time machine does with it’s backup). The problem is that when I set a new title on that NSMenuItem and the title is not changing.

It is in fact changing when I close and reopen the menu, but I want to update it while the user is looking at it.

I also tried remove an item and re-inserting it with no result.

Any pointers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:08:28+00:00Added an answer on May 23, 2026 at 1:08 am

    This actually works with no additional effort if your updating code runs in the run loop mode which is used during menu tracking. This is NSEventTrackingRunLoopMode, but you probably just want to use NSRunLoopCommonModes so the menu item title is correct when the menu is pulled down.

    Here’s a simple example of a menu item foo that counts the number of seconds since the app launched:

    - (void)doStuff;
    {
        static int i = 0;
        [foo setTitle:[NSString stringWithFormat:@"%d", ++i]];
    }
    
    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
    {
        NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:
                                    [self methodSignatureForSelector:@selector(doStuff)]];
        [invocation setTarget:self];
        [invocation setSelector:@selector(doStuff)];
        [[NSRunLoop mainRunLoop] addTimer:[NSTimer timerWithTimeInterval:1 invocation:invocation repeats:YES] forMode:NSRunLoopCommonModes];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to animate nsmenuitem that I have for my app (preferably use
I have an NSTextField that I would like to enable as-you-type spell checking. When
I have an NSStatusItem that has an NSMenuItem which contains a custom NSView. this
I have my shared user defaults plist that looks something like: menuItems (Array) Item
I have a NSMenuItem with a custom view. However, when I want to update
I have an application with an NSMenuItem that launches a separate window and I
I would like to have help about binding a function to NSMenuItem. I have
I have a subclassed NSView that I would like to contain an editable NSTextField,
I have an NSMenu (belonging to an NSPopUpButton ) where the NSMenuItem all have
have written this little class, which generates a UUID every time an object of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.