Re: NSTableView questions
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
>> awakeFromNibby 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