deny access to preferences etc?

Hi

In my application I have some code inside applicationWillFinishLaunching, if certain criteria isn’t met at the time of application launching I orderOut_(me), which is the main application window, and |makeKeyAndOrderFront_|(me), a secondary window.

When the secondary window launches I want to be able to deny access to all areas
in the menu bar next to the apple, ie: “About” application name, prefs etc.

Is their a way to do this?, if so how would I do it please?

cheers

I don’t know if this is the best way to do this, but when you make your secondary window key and front, you could disable the menu item like so:

current applications’s NSApp’s mainMenu’s itemWithTitle_(“”)'s setEnabled_(0)

Ric

thanks for that Ric, appreciated

It didn’t work to start with, found a wee typo, works a treat now

applications's

changed to

application's

cheers

Hi,

the usual way to do this is a modal session with NSModalSession or the validateMenuItem: delegate method