• 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: Newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question


  • Subject: Re: Newbie question
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 11 Feb 2009 09:21:58 -0600

On Feb 11, 2009, at 6:45 AM, TrePos wrote:

Sorry to bother with a newbie question but I'm kinda stuck. I fail to grasp the concept of interface builder. I know it sort of generates object meta information which is instantiated at program startup and thus eases the UI design process. I just have difficulty understanding how the 'connection' between IB defined objects and 'coded' objects work. The IB user manual is great but mostly explains the usage of the program but not so much about underlying concept.

The main way that connections are established between objects instantiated from a NIB and objects instantiated in code is via the File's Owner proxy in the NIB.


When working with a NIB in Interface Builder, you'll see File's Owner in the list of objects in the NIB. File's Owner is a conceptual stand- in for whatever object is specified as the owner of the NIB in the code which loads the NIB. You need to tell Interface Builder what class of object that will be. Then, in cooperation with Xcode, it can figure out what outlets File's Owner has. Then, you can connect those outlets to objects in your NIB. Also, objects in the NIB can connect to File's Owner (for example, using File's Owner as the target of an action). If you're using Bindings, then you can establish bindings through File's Owner and its properties.

The Application object in the NIB is a similar stand-in, this time for the main application object -- the instance of NSApplication or a subclass of NSApplication.

For the main NIB (usually MainMenu.nib), File's Owner is the application object, too. The framework's application startup code is responsible for loading the main NIB, and it specifies the application object as the owner of the NIB objects at that time.

Cheers,
Ken

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • RE: Newbie question
      • From: "Jon C. Munson II" <email@hidden>
References: 
 >Newbie question (From: TrePos <email@hidden>)

  • Prev by Date: Re: Newbie question
  • Next by Date: Re: How to launch Finder with given directory from Carbon app
  • Previous by thread: Re: Newbie question
  • Next by thread: RE: Newbie question
  • Index(es):
    • Date
    • Thread