Re: NSPanel should not close on command-W
Re: NSPanel should not close on command-W
- Subject: Re: NSPanel should not close on command-W
- From: Mike Abdullah <email@hidden>
- Date: Mon, 23 Jun 2008 15:17:07 +0100
On 23 Jun 2008, at 08:35, Georg Seifert wrote:
Now I found out how panels works in Apple apps: (I did not use them
often enough to be used to this behavior. I always had the panel
from Adobe apps in mind )
The panels have the "setBecomesKeyOnlyIfNeeded:YES" set and thats
it. Than they get closed by "command+W" if they have the focus
(normally if on control has it) or no other window is open.
The way I would like it is that is does not respond to "command-w"
at all. I think, I will try to implement my my own close button and
disable close in IB. Or has anyone a better idea?
Thanks for your help
Georg
I think implementing your own close button would be a very bad idea.
You'd have to get the look exactly right, and account for possible
changes by future OS's. If you're really desperate to have your own
custom behaviour, a better route is to intercept the command-w event
before NSPanel handles it.
Mike.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden