NSWindowController problem
NSWindowController problem
- Subject: NSWindowController problem
- From: Daniele <email@hidden>
- Date: Sat, 10 Jan 2004 00:34:46 +0100
hello i have subclassed an NSWIndowControllerClass. I have implemented
the windowDidLoad: method and it works correctly. Now i haven't found
any equivalent method for close. The only available is windowDidClose
but it not works.What's the correct method? (i need to release the
instance of created window)
this is my code for NSWindowController subclass:
@implementation COMPostWindow
- (id) init {
if (self) [super initWithWindowNibName:@"NewPost"];
return self;
}
- (void) windowWillLoad {
NSLog(@"LOADED");
}
- (void)windowDidClose:(NSNotification *)notification
{
NSLog(@"CLOSED");
if([notification object] == [self window])
[self autorelease];
}
- (void)dealloc
{
NSLog(@"Dealloc");
[super dealloc];
}
To open the windo I use:
COMPostWindow *s = [[COMPostWindow alloc] init];
[s showWindow:nil];
_______________________________________________
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.