• 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
NSWindowController problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSWindowController problem
      • From: Jörn Salewski <email@hidden>
  • Prev by Date: Re: a good book
  • Next by Date: WebKit: Inserting Values in form?
  • Previous by thread: Separate Nib For Sheets?
  • Next by thread: Re: NSWindowController problem
  • Index(es):
    • Date
    • Thread