Re: call to numberOfRowsInTableView during initialization
Re: call to numberOfRowsInTableView during initialization
- Subject: Re: call to numberOfRowsInTableView during initialization
- From: Corbin Dunn <email@hidden>
- Date: Mon, 12 Jun 2006 11:27:57 -0700
I guess this is because there are three table views). The debugger
shows that this occurs during the initialization phase, when the
pointers
table1,table2 and table3 are still nil (that is, uninitialized) and
the
argument aTableView is not nil.
Unfortunately, this is a side effect of nib-loading. The object is
being deserialized, and at the point of the dataSource being set, it
gets messaged; which, is before the outlet is set.
Another workaround is to set a BOOL flag that is set to YES when your
awakeFromNib is called, and to only log your error message when that
flag is set (that way, you know everything is hooked up and
initialized).
-corbin
_______________________________________________
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