Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
- Subject: Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
- From: Chuck Soper <email@hidden>
- Date: Mon, 26 Jul 2004 09:56:34 -0700
I just re-read your original email. What outlet are you talking about
when you say, "according to the docs one also creates an outlet in
the controller item as well (it's used in loading the nib so it must
be needed!)"? Can you provide a link to the docs you're referring to?
What is the Custom Class (in IB) of your File's Owner's instance in your nib?
I recommend that you review the SimpleMultiWindow example on your
computer in the following directory:
/Developer/Examples/InterfaceBuilder/SimpleMultiWindow
Chuck
At 9:02 AM -0500 7/26/04, John Spicer wrote:
Thanks for the help, I read through that link and I **seem** to have
done what they specify, but no joy. My window does load, it's just
not made the target till you click on it.
This leads me to suspect it's something with having the window in
the responder chain (i.e. I don't.).
Still stumped, still looking...
On Jul 24, 2004, at 11:36 AM, Chuck Soper wrote:
I have some similar issues related to unconnected outlets in my
code. I just found this documentation on the Apple web site. This
behavior is a surprise to me. Does it address your issue?
How are outlets connected at runtime?
The runtime code uses the list of outlets you generated in
Interface Builder at design time. For example, if you specified an
outlet called foo, Interface Builder first investigates the class
containing the outlet to see if it responds to setFoo:(id). If it
does, that method is called with the contents for foo. If
setFoo:(id) doesn't exist, the instance variable foo itself is
filled with the contents for foo.
http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBTips/index.html?http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBTips/Articles/MakingConnections.html
At 10:44 AM -0500 7/24/04, John Spicer wrote:
The main file has a menu with items on it. Each item on the menu
is connected to the instantiated controller. That controller (in
code) has a method that loads the nib file and makes the window
the active window (part of this does not work: the window loads
and displays but it's not active until you click on it).
So the target is connected from the menu (in the main nib) to the
action in the controller class. So far, so good.
However, according to the docs one also creates an outlet in the
controller item as well (it's used in loading the nib so it must
be needed!)
Where is this outlet connected to in the nib file?
I'm asking for two reasons:
[1] unconnected outlets annoy me, seems they should be hooked to SOMETHING!
[2] it's possible (I don't know) that not having this outlet
connected is what's causing the window when loaded to not be the
active one.
Am I missing something, perhaps those outlets are just left
hanging? I have looked in the archives without luck, perhaps there
is some apple sample code that shows this? (not an info window,
which I don't think is the same thing - again, I could be wrong).
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.