Programmatically connecting outlets

  • In my main app controller, I'm creating instances of a custom window
    controller to manage multiple copies of a window I have in a separate
    nib file. I'd like to create a connection between my app controller
    and the window controllers, so that controls in the window can
    communicate with the window controller, which can process information
    and then communicate with the app controller. How do I do this? Thanks
    in advance.
  • On Feb 2, 2008 10:25 PM, Jacob Bandes-Storch <jtbandes...> wrote:
    > I'd like to create a connection between my app controller
    > and the window controllers, so that controls in the window can
    > communicate with the window controller, which can process information
    > and then communicate with the app controller.

    There is nothing special about an outlet.  IBOutlet is a macro that
    expands to absolutely nothing.  It's simply used to tell IB "Hey, this
    ivar is supposed to be set in IB."

    --Kyle Sluder
  • On 03.02.2008, at 04:53, Kyle Sluder wrote:
    > On Feb 2, 2008 10:25 PM, Jacob Bandes-Storch <jtbandes...>
    > wrote:
    >> I'd like to create a connection between my app controller
    >> and the window controllers, so that controls in the window can
    >> communicate with the window controller, which can process information
    >> and then communicate with the app controller.
    >
    > There is nothing special about an outlet.  IBOutlet is a macro that
    > expands to absolutely nothing.  It's simply used to tell IB "Hey, this
    > ivar is supposed to be set in IB."

      Or in short, an outlet is just an instance variable that points to
    an object. Just assign it the value of whatever object you want it to
    point to. Usually, you'd use an accessor method for that.

    Cheers,
    -- M. Uli Kusterer
    "The Witnesses of TeachText are everywhere..."
    http://www.zathras.de
previous month february 2008 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29    
Go to today
MindNode
MindNode offered a free license !