-outlineView:heightOfRowByItem: gets an item of NULL??
-outlineView:heightOfRowByItem: gets an item of NULL??
- Subject: -outlineView:heightOfRowByItem: gets an item of NULL??
- From: John Stiles <email@hidden>
- Date: Thu, 21 Feb 2008 11:32:21 -0800
My outline view can occasionally get multi-line entries, so I've
implemented -outlineView:heightOfRowByItem: in the delegate. Normally
this works like a charm.
Now I'm working on some code to support dragging and dropping items
between one outline view and another outline view. (For what it's
worth, none of the items in this particular outline view are using a
nonstandard height in this case.) Suddenly, I've found that if I start
dragging items back and forth, after about ten tries or so,
-outlineView:heightOfRowByItem: is called with an item of "nil"!! I
haven't narrowed down a distinct pattern yet.
This causes an assertion to fire in my code because the first thing I do
is assert that [item isKindOfClass:[MyItem class]]. This assertion
hasn't ever gone off before.
Is it expected that this delegate method could occasionally be called
with a nil item?
As a workaround, should I just return [outlineView rowHeight] if I get nil?
_______________________________________________
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