• 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: call to numberOfRowsInTableView during initialization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >call to numberOfRowsInTableView during initialization (From: email@hidden)

  • Prev by Date: Re: call to numberOfRowsInTableView during initialization
  • Next by Date: Re: API Path Question
  • Previous by thread: call to numberOfRowsInTableView during initialization
  • Next by thread: Re: call to numberOfRowsInTableView during initialization
  • Index(es):
    • Date
    • Thread