I'm getting an NSMenuItem from the Main Menu, with the code here : Getting NSMenuItem of NSMenu tree by title
However, something strange happens :
- An
NSMenuItemconnected with an action : When using the sender property (NSMenuItem) and setting the title, it works. - BUT : When getting the item with the function above and set the title, the NSMenuItem's title does change, but the change is NOT reflected in the menu it belongs to.
What am I doing wrong? (I'm sure this one is really stupid... )
NSMenuItem* mi = [[core mainMenu] getItemWithPath:@"View" tag:PP_MENU_TAG_STATUSBAR];
[mi setTitle:@"newTitle"];
NSLog(@"mi : %@",[mi title]);
// mi changes, but no changes take effect in the mainMenu
