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

Re: NSWindowController problem


  • Subject: Re: NSWindowController problem
  • From: Jörn Salewski <email@hidden>
  • Date: Sat, 10 Jan 2004 05:30:31 +0100

Right now I can not find where - (void)windowDidClose:(NSNotification
*)notification should be defined. Where did you find it?

However, - (void)windowWillClose:(NSNotification *)notification is defined
as a delegate method in NSWindow. So, I would try (perhaps in the subclasses
implementation of windowDidLoad):

[[self window] setDelegate:self];

and then implement windowWillClose.

Yours,

Joern Salewski

am 10.01.2004 0:34 Uhr schrieb Daniele unter email@hidden:

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

References: 
 >NSWindowController problem (From: Daniele <email@hidden>)

  • Prev by Date: Re: NSWindow's firstResponder and a pointer to that object.
  • Next by Date: Re: NSTableHeaderView and NSTableView problem...
  • Previous by thread: NSWindowController problem
  • Next by thread: WebKit: Inserting Values in form?
  • Index(es):
    • Date
    • Thread