• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: willDisplayOutlineCell of view-based NSOutlineView is not called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: willDisplayOutlineCell of view-based NSOutlineView is not called


  • Subject: Re: willDisplayOutlineCell of view-based NSOutlineView is not called
  • From: Nava Carmon <email@hidden>
  • Date: Thu, 21 Jun 2012 11:22:05 +0300

Thanks for reply.

On Jun 21, 2012, at 11:05 AM, Lee Ann Rucker wrote:

> isItemExpandable and isGroupItem have nothing to do with NSCells. They're called for the items.
>
> Cell-based table and outlineView reuse the cells for each row; this was a memory-saving technique 20 years ago, not so useful today. So before they drew a particular cell it had to be configured for the item; that's what the willDisplayCell methods are for.
>
> outlineView:viewForTableColumn:item: is where you can create custom views.

I use this delegate method also to return a custom cell view. I have different views for group and regular cells. The problem is that the view position comes next to the disclosure button cell and not instead of it so the disclosure cell appearance stays default no matter what i try to do.


And this is what apple documentation says on this:

outlineView:willDisplayOutlineCell:forTableColumn:item:
	Informs the delegate that an outline view is about to display a cell used to draw the expansion symbol.
- (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn item:(id)item
	Discussion
		Informs the delegate that outlineView is about to display cell—an expandable cell (a cell that has the
		expansion symbol)—for the column and item specified by tableColumn and item. The delegate can modify
		cell to alter its display attributes.
This method is not invoked when outlineView is about to display a non-expandable cell.

So the cell has to be expandable to get this call



>
> ----- Original Message -----
> From: "Nava Carmon" <email@hidden>
> To: email@hidden
> Sent: Thursday, June 21, 2012 12:27:02 AM
> Subject: willDisplayOutlineCell of view-based NSOutlineView is not called
>
> Hi,
>
> I want to customize the disclosure arrow appearance in my view-based NSOutlineView.
> I overrode the willDisplayOutlineCell delegate method, but it's not called.
> The willDisplayCell delegate method - is not called either. Is it known issue or I'm missing something?
>
> (The isItemExpandable delegate function and isGroupItem returns YES for the expandable cell)
>
> Thanks,
>
> Nava
>
>
>
>
> _______________________________________________
>
> 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


  • Follow-Ups:
    • Re: willDisplayOutlineCell of view-based NSOutlineView is not called
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: willDisplayOutlineCell of view-based NSOutlineView is not called (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: willDisplayOutlineCell of view-based NSOutlineView is not called
  • Next by Date: Re: iOS disk full?
  • Previous by thread: Re: willDisplayOutlineCell of view-based NSOutlineView is not called
  • Next by thread: Re: willDisplayOutlineCell of view-based NSOutlineView is not called
  • Index(es):
    • Date
    • Thread