Re: Floating palette close behavior
Re: Floating palette close behavior
- Subject: Re: Floating palette close behavior
- From: "Peter Sichel" <email@hidden>
- Date: Wed, 30 Jul 2003 13:53:17 -0400
That worked, thanks!
- Peter
>
In that case, stupid suggestion of the day:
>
>
Subclass NSPanel:
>
>
#import "MyPanel.h"
>
>
@implementation MyPanel
>
>
- (void)performClose:(id)sender;
>
{
>
if ([sender isMemberOfClass:[NSMenuItem class]]==NO) // maybe
>
isKindOfClass if you're subclassing the NSMenuItem
>
{
>
[super performClose:sender];
>
}
>
}
>
>
@end
>
>
and set MyPanel to be the class of your Utility window
>
>
Le mercredi, 30 juil 2003, ` 17:14 Europe/Paris, Peter Sichel a icrit :
>
>
>> A quick test in PB shows that the Command + W message is not taken
>
>> into
>
>> account by the Utility window if the close option is unchecked.
>
>
>
> Yes, but unchecking the close option removes the close button.
>
> I don't want to eliminate the close button, I want it to follow
>
> the Aqua interface guidelines.
>
>
>
> - Peter
>
>
>
>>
>
>> The close menu is grayed out in this case. So it might be something in
>
>> your code leading to this unwanted behavior.
>
>>
>
>> Did you change the target:action of the Close Menu Item?
>
>>
>
>> Le mercredi, 30 juil 2003, ` 15:01 Europe/Paris, Peter Sichel a icrit
>
>> :
>
>>
>
>>> My application uses a floating palette (NSPanel) that doesn't seem
>
>>> to follow the Aqua specified behavior.
>
>>>
>
>>> Palettes aren't supposed to be closable with Cmd-W (nor are windows
>
>>> without
>
>>> a red close button). Palette close buttons should never be red, but
>
>>> always gray.
>
>>> My palette never shows its close button as red, but it will still
>
>>> close
>
>>> by Cmd-W.
>
>>>
>
>>> Any ideas for why I'm not seeing the correct behavior, or how I
>
>>> should
>
>>> implement it
>
>>> would be appreciated.
>
>>>
>
>>> Thanks!
>
>>>
>
>>> - Peter
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.