• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Floating palette close behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Floating palette close behavior


  • Subject: Re: Floating palette close behavior
  • From: Stéphane Sudre <email@hidden>
  • Date: Wed, 30 Jul 2003 17:36:06 +0200

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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Floating palette close behavior
      • From: "Peter Sichel" <email@hidden>
References: 
 >Re: Floating palette close behavior (From: "Peter Sichel" <email@hidden>)

  • Prev by Date: Re: Floating palette close behavior
  • Next by Date: What's this error mean
  • Previous by thread: Re: Floating palette close behavior
  • Next by thread: Re: Floating palette close behavior
  • Index(es):
    • Date
    • Thread