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: Donald Brown <email@hidden>
- Date: Wed, 08 May 2002 17:57:39 -0500
I didn't express myself well. The file owner is Layout Controller, that's
what I meant by the "instance". Did some more searching, some people found
a reference to [controller window] to fix it--but hasn't. Really weird,
because I've got a FindPanel with identical code, but it doesn't seem to
work here.
Thanks, though.
Donald
on 5/8/02 5:42 PM, Brendan Younger at email@hidden wrote:
>
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.
--
Donald Brown
email@hidden
http://www.eamontales.com
We have met the enemy and he is us - Pogo
_______________________________________________
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.