• 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: NSTableView questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView questions


  • Subject: Re: NSTableView questions
  • From: Chris Williams <email@hidden>
  • Date: Mon, 08 Oct 2007 07:29:45 -0700
  • Thread-topic: NSTableView questions

This is true, that's what the doc says.  But, since you cannot predict the
order in which "awakeFromNib" will be called among the various objects, you
therefore cannot predict the state of all the objects.

For example, if ObjA needs to do some stuff before it's ready to be called,
and it does that stuff in its "awakeFromNib", having ObjB call it in its own
"awakeFromNib" is dangerous.  It gets really ugly when ObjB itself needs to
do some things in "awakeFromNib" before it can be safely called.

You need a predictable and reliable call order to solve these initialization
"race conditions".  And you don't have that predictable call order in
"awakeFromNib" (see the parenthetical statement you quoted below).

The only really good solution is to wait until even later -- in
"applicationDidFinishLaunching".

On 10/8/07 6:30 AM, "Paul Bruneau" <email@hidden> wrote:

> I'm not sure the docs agree with you, they say
>
>> Messages to other objects can be sent safely from within
>> awakeFromNib‹by which time it¹s assured that all the objects are
>> unarchived and initialized (though not necessarily awakened, of
>> course).

_______________________________________________

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: NSTableView questions
      • From: Paul Bruneau <email@hidden>
    • Re: NSTableView questions
      • From: Bill Bumgarner <email@hidden>
References: 
 >Re: NSTableView questions (From: Paul Bruneau <email@hidden>)

  • Prev by Date: Re: NSTableView questions
  • Next by Date: Re: NSTableView questions
  • Previous by thread: Re: NSTableView questions
  • Next by thread: Re: NSTableView questions
  • Index(es):
    • Date
    • Thread