runModalForWindow is disabling my menus
runModalForWindow is disabling my menus
- Subject: runModalForWindow is disabling my menus
- From: Felipe Monteiro de Carvalho <email@hidden>
- Date: Sat, 05 Sep 2015 14:14:18 +0200
Hello,
I want to have a modal window which has menus, so I setup the menus
for the window and make it modal with NSApp.runModalForWindow and
everything is OK, except that my menu items are all disabled!
I tried to forcefully enable them, by implementing validateMenuItem
and returning always true, but it doesn't work.
Each menu item has itself as target and a method to respond to the action.
If I only change from runModalForWindow to a non-modal window show,
then everything works ok!
Any ideas or is it impossible to have menu items and use runModalForWindow?
I have a hard time understanding whats the problem here and why the
menus won't just work.
I searched Google and other people had this problem, but noone solved
it. It seams that few people use modal windows with menus, by the way
as there were not that many discussions about it.
thanks,
--
Felipe Monteiro de Carvalho
_______________________________________________
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