Re: NSTableView questions
Re: NSTableView questions
- Subject: Re: NSTableView questions
- From: Paul Bruneau <email@hidden>
- Date: Mon, 8 Oct 2007 12:00:22 -0400
ahh I see it now, thanks Chris.
On Oct 8, 2007, at 10:29 AM, Chris Williams wrote:
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