(Sorry if you're getting this twice, I'm an idiot and forgot to set
the From option.)
On Jan 15, 2008 6:15 PM, Corbin Dunn <email@hidden> wrote:
I realize the release notes are rather long, but they are a good
read.
Especially for controls/components that you use.
I did read them, but obviously not closely enough. ;)
To be honest, this seems like The Wrong Way(tm) to do it. It seems
far more appropriate for the delegate to provide this information,
and
thus suffer from the tight coupling with the data source. Filed as
r.
5690092.
Thank you for logging the bug! This is the best way to get things
like this changed.
For others, Kyle is basically asking that the option to show a
disclosure triangle be determined by a delegate method. That is an
excellent it, and it is something we have wanted to do. It was more
of a timing issue for why it wasn't done.
thanks,
corbin
I'm a little unsure of the netiquette here, as I have a nice solution
BUT *it is someone else's code* and I don't know who/where from!
Explanation follows, but please don't credit me for it.
Subclass NSOutlineView, and override the following method:
- (NSRect)frameOfOutlineCellAtRow:(NSInteger)row
{
// Default to show triangle
BOOL showTriangle = YES;
// See if delegate responds to new selector
if ([[self delegate]
respondsToSelector
:@selector(outlineView:shouldShowDisclosureTriangleForItem:)])
{
// Perform selector using objc_msgSend() to avoid compiler warnings
SEL selector =
@selector(outlineView:shouldShowDisclosureTriangleForItem:);
id item = [self itemAtRow:row];