How to know that a palette has been closed ? ( windowWillClose Notification )
How to know that a palette has been closed ? ( windowWillClose Notification )
- Subject: How to know that a palette has been closed ? ( windowWillClose Notification )
- From: jean-michel daix <email@hidden>
- Date: Mon, 27 Jan 2003 11:47:38 +0100
Hi,
I've got my mainmenu with an item to open or close a floating palette. My
appDelegate handles the state of the menu ( NSOffState / NSOnState ) to
reflect if the window is or not visible.
Now I want to modify my menu item state when my palette is closed manually.
( when the window close button is pushed, not by using the item menu)
I've try to add a "windowWillClose" notification to the windowController of
my sharedToolPalette but, I don't know why, it's never called.
Any clue, documentation or example are welcome.
-----------------------------------
Jean-Michel DAIX / <email@hidden>
Sorry, I m French !
All the Super Bowl 2003 ads on AdForum.com!
visit <
http://superbowl.adforum.com >
#import "DXToolsPaletteController.h"
@implementation DXToolsPaletteController
+ (id) sharedToolPalette
{
NSLog(@"DXToolsPaletteController sharedPalette\r" );
static DXToolsPaletteController *sharedToolPalette = nil ;
if ( !sharedToolPalette ) {
sharedToolPalette = [ [DXToolsPaletteController alloc] init
];
}
return ( sharedToolPalette );
}
-(void)windowDidLoad{
NSLog(@"DXToolsPaletteController windowDidLoad\r");
}
- (id) init
{
NSLog(@"DXToolsPaletteController init\r");
self = [ self initWithWindowNibName: @"DXToolPalette"];
return ( self );
}
- (void)windowWillClose:(NSNotification *)aNotification
{
NSLog(@"DXToolsPaletteController windowWillClose\r");
}
@end
_______________________________________________
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.