• 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: My file owner isn't getting connected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My file owner isn't getting connected


  • Subject: Re: My file owner isn't getting connected
  • From: Brendan Younger <email@hidden>
  • Date: Wed, 8 May 2002 18:42:36 -0400

You don't want to have an instance of LayoutController inside your nib file. Since it must exist before the nib is loaded, there is no point in storing another instance in the nib file. What is actually happening is that two instances exist, one of them your shared controller and the other from the nib file. The one from the nib file won't have any of its outlets set. What you should do is delete the instance inside the nib, set the class of the File's Owner to your window controller subclass (in the Inspector under "Attributes"), and connect all your actions and outlets to the File's Owner. Then, when the nib is loaded, your shared controller will be properly initialized.

Brendan Younger

On Wednesday, May 8, 2002, at 04:38 PM, Donald Brown wrote:

I'm working on a project where I have a Window controller class
LayoutController, which is in a nib Layout.nib as the file owner. Here's
the code to create it:
<snip>
I can use the shared layout to make the window appear, but even after
windowDidLoad has been called, none of my outlets are connected (they are
all nil) and clicking on a button does not call the method that I've linked
the button to in the Interface builder. The Nib file has only the file
owner (which is of type LayoutController) and the window itself. I've
checked and rechecked my connections and attributes, and I don't see
anything wrong. Anyone ever have something similar happen, and how did they
fix it?
_______________________________________________
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: My file owner isn't getting connected
      • From: email@hidden
    • Re: My file owner isn't getting connected
      • From: Donald Brown <email@hidden>
References: 
 >My file owner isn't getting connected (From: Donald Brown <email@hidden>)

  • Prev by Date: Drawing on the back of an NSWindow
  • Next by Date: Re: Quitting an application
  • Previous by thread: My file owner isn't getting connected
  • Next by thread: Re: My file owner isn't getting connected
  • Index(es):
    • Date
    • Thread