• 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: Help with Cocoa document app & controllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with Cocoa document app & controllers


  • Subject: Re: Help with Cocoa document app & controllers
  • From: Gordon Apple <email@hidden>
  • Date: Wed, 26 Dec 2007 21:47:32 -0600

    The Init method does not get called for controllers in your nib.  (Just
ran into that myself recently.)  You need initWihCoder or else do what you
need in awakeFromNib if it needs to have the connections first.
(Connections are guaranteed to be established before awakeFromNib gets
called.)


> To: Jeff Johnson <email@hidden>
> Cc: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Dec 26, 2007, at 5:24 PM, Jeff Johnson wrote:
>
>> My guess is that the nib has not yet been loaded when you attempt to
>> use the IBOutlet.  You can determine this for sure by calling -
>> [NSWindowController isWindowLoaded], and you can load the nib by
>> calling -[NSWindowController window], for example.
>
> You're right. It appears that calling NSWindowController's
> initWithNibName does not cause the nib to be loaded yet.
>
> Which means I can't do any real initialization in my controller's -
> init method. So, where am I supposed to do it? I know it's getting
> loaded eventually; the window shows up.
>
>
> TIA,
> --
> Rick
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Help with Cocoa document app & controllers
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: Predicates
  • Next by Date: Re: Predicates
  • Previous by thread: Re: Help with Cocoa document app & controllers
  • Next by thread: Re: Help with Cocoa document app & controllers
  • Index(es):
    • Date
    • Thread