Re: Problem with NSOutlineView outlineView:willDisplayCell:forTableColumn:item: delegate method
Re: Problem with NSOutlineView outlineView:willDisplayCell:forTableColumn:item: delegate method
- Subject: Re: Problem with NSOutlineView outlineView:willDisplayCell:forTableColumn:item: delegate method
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 26 May 2004 15:48:53 -0400
on 2004-05-26 3:20 PM, Tim Hewett at email@hidden wrote:
>
> It is up to you to notice which cell is being displayed on the current
>
> call
>
> to this delegate method, and to provide results accordingly.
>
>
Very true.
>
>
> It sounds like
>
> you aren't paying any attention to the row: parameter value that is
>
> passed
>
> into the delegate method. Ditto for the forTableColumn: parameter
>
> value.
>
>
The code takes specific note of this information in the delegate
>
method in fact, but the NSOutlineView actually displays the cell only in
>
the frame of the row that has been clicked on. I believe it is the
>
outline
>
view's internal responsibility to decide on the location and size of the
>
frame of the cell it would like to draw, to then pass to the cell's
>
drawWithFrame:inView: method, since only it knows the actual locations
>
of the rows within the scrollable view.
I should have spelled this out a little more, adding this: Since the
delegate method is called on every cell that needs to be displayed, your
implementation has to provide display information both for the cell you do
want to reflect your custom formatting or whatever, and all cells that you
do NOT want to be affected. Like, telling one cell to show red text and all
the others to show black.
I've never had any problem displaying and modifying custom cells in table
views, although I haven't done much in the way of custom cell formatting
with this method.
But again, I haven't made an effort to understand exactly what you're seeing
so this may be completely off the mark.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.