Skip navigation.
 
mlRe: NSPanel should not close on command-W
FROM : Andrew Merenbach
DATE : Sat Jun 21 20:47:25 2008

On Jun 21, 2008, at 11:00 AM, Georg Seifert wrote:

>>> I use the panel as a palette. Something like the systems font 
>>> chooser.
>>> They have the close button enabled, but do not responde to close
>>> commands from the keyboard.

>>
>> Using TextEdit as an example, the font panel *will* close on 
>> command-w, if
>> it becomes key. It is just that it won't become key unless/until all
>> document windows are closed. This is the expected behavior I was 
>> talking
>> about.

>
> I cannot reproduce this. If I close all documents in Textedit (or 
> any other Mac-App) the font panel stays there and I get a NSBeep on 
> hitting command-w.


Hi!  If you click on the Font panel's title bar before you hit command-
w, you will see it activate -- then, when you do hit command-w, it 
*will* close.  Thus it does indeed respond to the keyboard shortcut. 
Perhaps you can work some magic with -(BOOL)canBecomeKeyWindow or -
(BOOLcanBecomeMainWindow?

Cheers,
   Andrew

Related mailsAuthorDate
mlNSPanel should not close on command-W Georg Seifert Jun 21, 15:02
mlRe: NSPanel should not close on command-W Keary Suska Jun 21, 18:55
mlRe: NSPanel should not close on command-W Georg Seifert Jun 21, 19:10
mlRe: NSPanel should not close on command-W Marco Masser Jun 21, 19:10
mlRe: NSPanel should not close on command-W Keary Suska Jun 21, 19:40
mlRe: NSPanel should not close on command-W Georg Seifert Jun 21, 20:00
mlRe: NSPanel should not close on command-W Jason Stephenson Jun 21, 20:19
mlRe: NSPanel should not close on command-W Georg Seifert Jun 21, 20:25
mlRe: NSPanel should not close on command-W Andrew Merenbach Jun 21, 20:47
mlRe: NSPanel should not close on command-W Georg Seifert Jun 23, 09:35
mlRe: NSPanel should not close on command-W Mike Abdullah Jun 23, 16:17
mlRe: NSPanel should not close on command-W Jim Correia Jun 23, 17:18
mlRe: NSPanel should not close on command-W Andy Lee Jun 23, 17:31
mlRe: NSPanel should not close on command-W Georg Seifert Jun 23, 18:01
mlRe: NSPanel should not close on command-W Quincey Morris Jun 23, 20:06