• 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
Order of instantiation within a NIB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Order of instantiation within a NIB


  • Subject: Order of instantiation within a NIB
  • From: John Brownlow <email@hidden>
  • Date: Mon, 11 Apr 2005 13:36:31 -0400

I have a main editor window which has several drawers. Each of these drawers is quite complicated so I gave each one its own controller to separate out the logic, although they are staying in the same NIB because they are fundamentally connected.

Just for my own personal ease I would rather instantiate these controllers in the NIB so I can hook them up with IBOutlets etc. But then the question becomes, how to initialize them.

If I could rely on all the objects in the NIB being initialized when they are created then they could initialize themselves, but I suspect that is not how things work and so not all the objects they need will be there when they are instantiated.

The alternative is to put the initialization in the mainEditorWindowController which loads the NIB, but that grates because I feel the objects should self-initialize. What is good practice here? Should I have a -NIBDidLoad method that the windowController calls, or a notification, or what?

--
John Brownlow
Deep Fried Films, Inc

http://www.johnbrownlow.com
http://www.pinkheadedbug.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Order of instantiation within a NIB
      • From: "John C. Randolph" <email@hidden>
    • Re: Order of instantiation within a NIB
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: WWDC2k5 and ROI
  • Next by Date: Re: NSBezierPath geometry question...
  • Previous by thread: Re: Question about relation between File's Owner, First Responder and controller object...
  • Next by thread: Re: Order of instantiation within a NIB
  • Index(es):
    • Date
    • Thread