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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to