I haove a mutilDocument App , I found that when I open a window with the method : [NSApp beginSheet: [MultiWin window] modalForWindow: mainWindows modalDelegate: nil didEndSelector: nil contextInfo: nil]; The Quit func in mainmeny already highlight , this can confuse the user that the Quit app func can work under this vironment.I want to disable the Quit func under that , how to do? Thank you very much!
A:
Add an outlet for the menu item, connect it in IB, then set its enabled
to NO
after you begin your sheet and back to YES
in your sheet-ended callback.
Peter Hosey
2009-04-14 03:27:18
A:
You should implement validateMenuItem: in your window controller class. Check out the NSMenuValidation Protocol Reference.
Mark Thalman
2009-04-14 12:58:47