Re: outlineView:dataCellForTableColumn:item: repeated called w null tableColumn on Snow Leopard
Re: outlineView:dataCellForTableColumn:item: repeated called w null tableColumn on Snow Leopard
- Subject: Re: outlineView:dataCellForTableColumn:item: repeated called w null tableColumn on Snow Leopard
- From: David Melgar <email@hidden>
- Date: Fri, 28 Aug 2009 18:07:22 -0400
I printed out all the calls.
What happening is:
1. My data source/delegate/controller initWithCoder method is invoked.
But its pointer to the document is not valid yet so it doesn't have
data.
2. outlineView:numberOfChildrenOfItem: method is invoked. It cannot
access the document and returns 0.
3. awakeFromNib is called. The root object (document) is now correct.
4. A series of calls to outlineView:dataCellForTableColumn:item: where
tableColumn is passing in nil. I return nil.
Thats it.
It doesn't seem correct that the view is asking for numberOfChildren
before awakeFromNib was called.
If that is appropriate, how can I insure that I have valid data before
awakeFromNib is called?
If it matters, I'm running a 32bit build.
Thanks
On Aug 28, 2009, at 3:45 PM, Corbin Dunn wrote:
On Aug 28, 2009, at 11:58 AM, David Melgar wrote:
Running into a problem getting my application to run under Snow
Leopard.
In this case I have an outline view with a data source. The method,
outlineView:dataCellForTableColumn:item: is being repeated called
on my delegate with a null tableColumn, not just the first time as
the documentation states. The code returns different cells based on
the column, but its never passed the tableColumn.
I haven't heard of this problem. Try printing out all calls to the
method (include parameters), and printing out what you are returning
each time.
corbin
_______________________________________________
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