tags:

views:

61

answers:

2

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
A: 

You should implement validateMenuItem: in your window controller class. Check out the NSMenuValidation Protocol Reference.

Mark Thalman