Re: -outlineView:heightOfRowByItem: gets an item of NULL??
Re: -outlineView:heightOfRowByItem: gets an item of NULL??
- Subject: Re: -outlineView:heightOfRowByItem: gets an item of NULL??
- From: John Stiles <email@hidden>
- Date: Thu, 21 Feb 2008 12:06:46 -0800
Fair enough, but the root item is never represented graphically in a
table, so there wouldn't be a need to ask for its row height…?
Anyway, I filed a radar… we'll see what happens.
Mike Abdullah wrote:
Although the docs don't mention it for this method, quite often an
item of nil is used to represent the tree's root object. I would
suggest therefore returning the default height of a table cell.
Mike.
On 21 Feb 2008, at 19:32, John Stiles wrote:
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
_______________________________________________
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