If you really mean main window in the NSWindow sense (makeMainWindow), then you will want to look at the windowShouldClose delegate method (as mentioned by Jack) and observe the NSWindowDidResignMainNotification notification for the window so you can set it back.

More likely, though, you should be looking at NSPanel for your other windows. If they're stealing mainWindow status, NSPanel will fix that because it will refuse to become main. If NSPanel does not meet you need, you can make your own subclass of NSWindow or NSPanel to get what you're looking for.

-Rob

--
Rob Napier -- Software and Security Consulting -- http://robnapier.net



On Apr 8, 2008, at 5:31 PM, norio wrote:
Hi,
My app is not a document-based application. And it has a main window and other windows.

What I want to ask you to tell me is how to remain still the main window even if user
option-clicks the close box of one of the other windows.

I tried observing with its name nil and object nil. But I couldn't get which notification
actually makes the windows close.

Would you tell me how to remain the main window? Of course, it must close if user clicks
the close box of the window.

Any suggestions would be appreciated.

Norio

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to