Re: My file owner isn't getting connected
Re: My file owner isn't getting connected
- Subject: Re: My file owner isn't getting connected
- From: Brendan Younger <email@hidden>
- Date: Wed, 8 May 2002 18:42:36 -0400
You don't want to have an instance of LayoutController inside your nib
file. Since it must exist before the nib is loaded, there is no point
in storing another instance in the nib file. What is actually happening
is that two instances exist, one of them your shared controller and the
other from the nib file. The one from the nib file won't have any of
its outlets set. What you should do is delete the instance inside the
nib, set the class of the File's Owner to your window controller
subclass (in the Inspector under "Attributes"), and connect all your
actions and outlets to the File's Owner. Then, when the nib is loaded,
your shared controller will be properly initialized.
Brendan Younger
On Wednesday, May 8, 2002, at 04:38 PM, Donald Brown wrote:
I'm working on a project where I have a Window controller class
LayoutController, which is in a nib Layout.nib as the file owner.
Here's
the code to create it:
<snip>
I can use the shared layout to make the window appear, but even after
windowDidLoad has been called, none of my outlets are connected (they
are
all nil) and clicking on a button does not call the method that I've
linked
the button to in the Interface builder. The Nib file has only the file
owner (which is of type LayoutController) and the window itself. I've
checked and rechecked my connections and attributes, and I don't see
anything wrong. Anyone ever have something similar happen, and how did
they
fix it?
_______________________________________________
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.