Re: init with parameters for objects in interface builders
Re: init with parameters for objects in interface builders
- Subject: Re: init with parameters for objects in interface builders
- From: Louis Foucart <email@hidden>
- Date: Tue, 15 Oct 2002 14:06:48 -0300
They are subclasses of NSObject. The problem is that they are created
by the application when it processes the nib file. I don't have any
control on the init phase of these objects.
So I have a main class (a NSView) which should initialize other objects
in its initWithFrame method. The fact is that some objects (IBOutlets)
are null when I want to init them.
Sample:
I have a custom NSView and a custom NSObject called controller
initialized in the nib file.
The NSView interface looks like this :
IBOutlet Controller controller;
The NSView method looks like this:
- (void)initWithFrame:(NSRect)frame {
...
[controller initWithX:frame.x y:frame.y]; // I need objects specified
earlier in this method, for example frame is defined in the nib file
}
But controller is null when NSView initWithFrame is called.
Where can I put my init call on controller ?
Is there something nicer than call a setup method from the controller
on the view, which method will call back initWithx:y: on the controller
?
_______________________________________________
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.