• 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: Behavior of autoreleased window controller for closing window vs. app termination
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Behavior of autoreleased window controller for closing window vs. app termination


  • Subject: Re: Behavior of autoreleased window controller for closing window vs. app termination
  • From: James DiPalma <email@hidden>
  • Date: Mon, 30 Sep 2002 22:50:48 -0400

Can you get a backtrace for both of your windowWillClose: hits?

A suggestion (that will not change anything about how your code works) is to change this method:

- (id)initWithPersonID:(int)ID
{
self = [super initWithWindowNibName:@"User2"];
NSLog(@"Creating User Controller for %d",ID);
return self;
}

To something like this:

- (id) initWithPersonID:(int)pid
{
[self initWithWindowNibName:@"User2"];
NSLog(@"Creating User Controller for %d", pid);
return self;
}

Even though your class does not implement initWithWindowNibName:, your superclass does, so this change will not change your application. But, someday a subclass of your class may want to override initWithWindowNibName: and that method would not get called during your initWithPersonID:.


-jim
_______________________________________________
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: Behavior of autoreleased window controller for closing window vs. app termination
      • From: Alan Nilsson <email@hidden>
References: 
 >Behavior of autoreleased window controller for closing window vs. app termination (From: Alan Nilsson <email@hidden>)

  • Prev by Date: Re: C++ mixed with Cocoa
  • Next by Date: Re: C++ mixed with Cocoa
  • Previous by thread: Behavior of autoreleased window controller for closing window vs. app termination
  • Next by thread: Re: Behavior of autoreleased window controller for closing window vs. app termination
  • Index(es):
    • Date
    • Thread