How to disable the Quit func under the mutilDocument environment ?

Discussion in 'Mac Programming' started by xiaohuli170, Apr 13, 2009.

  1. macrumors newbie

    Jan 13, 2009
    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!
  2. Moderator emeritus


    Jun 15, 2000
    To be honest I wouldn't worry about this too much. This is "standard' behavior and happens in most Cocoa apps.

    But if you really do want to do this, you need to implement validateMenuItem:

Share This Page