• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: John Spicer <email@hidden>
  • Date: Mon, 26 Jul 2004 09:02:01 -0500

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.


  • Follow-Ups:
    • Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
      • From: Chuck Soper <email@hidden>
References: 
 >main nib, secondary nib, where do the outlets get connected to in the main nib? (From: John Spicer <email@hidden>)
 >Re: main nib, secondary nib, where do the outlets get connected to in the main nib? (From: Chuck Soper <email@hidden>)

  • Prev by Date: Re: What's with this "new"?
  • Next by Date: File/Directory Notifications
  • Previous by thread: Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
  • Next by thread: Re: main nib, secondary nib, where do the outlets get connected to in the main nib?
  • Index(es):
    • Date
    • Thread