Re: Problem with multiple instances of a nib
Re: Problem with multiple instances of a nib
- Subject: Re: Problem with multiple instances of a nib
- From: PCWiz <email@hidden>
- Date: Sun, 22 Nov 2009 17:52:58 -0700
Thanks for everyone's help, what I'll probably end up doing is
creating a panel manager class to keep strong references to the panels.
On 2009-11-22, at 3:58 PM, Rob Keniger wrote:
On 23/11/2009, at 8:49 AM, PCWiz wrote:
Good to know that I'm not the only one experiencing this. The
easiest solution I guess is to keep an array of the controller
objects, which I will try. Is this how you mean:
NSMutableArray *controllerObjects = [[NSMutableArray alloc] init];
ImagePanelController *newController = [[[ImagePanelController
alloc] init] autorelease];
[controllerObjects addObject:newController];
With this method, when the panel is closed would the controller be
removed from the array (I'm guessing not, and if so, how would I
make it do that?)
Register the object that manages the array as a delegate of the
window, implement -windowWillClose: and remove the appropriate
window controller from the array?
--
Rob Keniger
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden