FROM : Mike Abdullah
DATE : Thu Feb 21 21:04:56 2008
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_removed>)
>
> 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/<email_removed>
>
> This email sent to <email_removed>
DATE : Thu Feb 21 21:04:56 2008
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_removed>)
>
> 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/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| John Stiles | Feb 21, 20:32 | |
| Mike Abdullah | Feb 21, 21:04 | |
| John Stiles | Feb 21, 21:06 | |
| Corbin Dunn | Feb 22, 17:18 | |
| John Stiles | Feb 22, 20:53 | |
| Corbin Dunn | Feb 22, 21:05 | |
| John Stiles | Feb 22, 21:15 | |
| Corbin Dunn | Feb 22, 21:39 | |
| John Stiles | Feb 22, 22:46 |






Cocoa mail archive

