Referencing specific window in NIB file

  • Hi Everyone,

    I have an NIB file with two Windows in it. I can successfully
    instantiate a Window with by extending NSWindowController.

    If I have more than one Window in the NIB, how do I reference a
    specific window from the Window controllers?

    Or have shouldn't I be doing this.

    Thanks.

    --
    "I never look back darling, it distracts from the now", Edna Mode (The
    Incredibles)
  • On Aug 27, 2007, at 6:14 PM, Devraj Mukherjee wrote:

    > If I have more than one Window in the NIB, how do I reference a
    > specific window from the Window controllers?

    What's stopping you from creating an IBOutlet to the second window?

    Nick Zitzmann
    <http://www.chronosnet.com/>
  • In your nib file, assign your NSWindowController subclass to "File's
    Owner".
    In your subclass create another outlet for your second window, and
    then connect them in IB.
    That's it.

    When you load your nib file using your NSWindowController subclass
    the outlets will be connected.

    Paulo F. Andrade <52439...>
    mailto: <pfca...>

    On 2007/08/28, at 01:14, Devraj Mukherjee wrote:

    > Hi Everyone,
    >
    > I have an NIB file with two Windows in it. I can successfully
    > instantiate a Window with by extending NSWindowController.
    >
    > If I have more than one Window in the NIB, how do I reference a
    > specific window from the Window controllers?
    >
    > Or have shouldn't I be doing this.
    >
    > Thanks.
    >
    > --
    > "I never look back darling, it distracts from the now", Edna Mode (The
    > Incredibles)
previous month august 2007 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 30 31    
Go to today