Re: Main menu update problem
Re: Main menu update problem
- Subject: Re: Main menu update problem
- From: Laurent Daudelin <email@hidden>
- Date: Wed, 10 Aug 2011 14:42:50 -0700
On Aug 10, 2011, at 14:25, Michael Domino wrote:
> Hi,
>
> My app sometimes runs by being started by a launch agent. When that happens, the app in minimized in the Dock by calling the NSApplication method miniaturizeAll. That works fine. When the operation is complete, I want to again show the app, so I call the NSWindowController method showWindow. The windows are brought out of the Dock and the main window is active and in the front, which is good. The problem is that the app's main menu is not updated, so the menu of whatever app was in the front at the time my app was started is still visible. My app's menu appears if I switch to another app in the Finder, and then back to my app, or if I do a key-equivalent of a menu item.
>
> Is there some way to force the main menu to update? I've tried a bunch of things, but nothing seems to work. I tried using NSApplication unhide and activateIgnoringOtherApps, but that didn't help.
>
> This is only a problem in 10.5 and 10.6. The problem does not occur in Lion, which makes me suspect that it's a system bug.
>
> Thanks,
> Michael
Did you try to make the window key, as in "makeKeyAndOrderFront:"?
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
Logiciels Nemesys Software email@hidden
_______________________________________________
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