• 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: awakeFromNib Called Twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awakeFromNib Called Twice


  • Subject: Re: awakeFromNib Called Twice
  • From: Bruce Cresanta <email@hidden>
  • Date: Thu, 27 Jan 2011 18:33:17 -0700

Thank you!

I'm trying your suggestions now.

Bruce
On Jan 27, 2011, at 6:28 PM, Quincey Morris wrote:

> On Jan 27, 2011, at 17:10, Bruce Cresanta wrote:
>
>> 	I have an NSDocument instance in my IB!  It was the only way I could hook up a connection to a controlView for the window that gets created for the document.
>>
>> Do you know a way to programmatically retrieve the controlView for the window that gets created for the document?
>> This would enable me to forget IB altogether, which is not a problem because I'm using all custom controls written from scratch.
>
> What's the NIB's File's Owner object? The document, or a window controller?
>
> If the document, you can connect NIB objects directly to the File's Owner proxy. (Make sure you set it to the correct NSDocument subclass in IB's Identity panel.)
>
> If the window controller, you should probably be doing all this stuff in the window controller instead. Note, though, that a window controller has a "document" property which allows you to get to the document through it.
>
> If your controls are all custom code, they can find the document directly (as 'self.window.windowController.document'), provided that the controls have already been added to a view that's been already added to the window. You may not need to create any outlets at all.
>

_______________________________________________

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: awakeFromNib Called Twice
      • From: Bruce Cresanta <email@hidden>
References: 
 >awakeFromNib Called Twice (From: Bruce Cresanta <email@hidden>)
 >Re: awakeFromNib Called Twice (From: Quincey Morris <email@hidden>)
 >Re: awakeFromNib Called Twice (From: Bruce Cresanta <email@hidden>)
 >Re: awakeFromNib Called Twice (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: awakeFromNib Called Twice
  • Next by Date: Re: awakeFromNib Called Twice
  • Previous by thread: Re: awakeFromNib Called Twice
  • Next by thread: Re: awakeFromNib Called Twice
  • Index(es):
    • Date
    • Thread