Re: The NSOutlineView didClickTableColumn problem
Re: The NSOutlineView didClickTableColumn problem
- Subject: Re: The NSOutlineView didClickTableColumn problem
- From: Brian Webster <email@hidden>
- Date: Tue, 9 Dec 2003 15:09:48 -0600
I was able to get around this by digging around and finding a private
method on NSTableView called _sendDelegateDidClickColumn:. So, I
subclassed NSOutlineView and implemented it like so:
- (void)_sendDelegateDidClickColumn:(int)column
{
if ([self delegate] != nil && [[self delegate]
respondsToSelector:@selector(outlineView:didClickTableColumn:)])
{
[[self delegate] outlineView:self didClickTableColumn:[[self
tableColumns] objectAtIndex:column]];
}
}
My app that uses this still works fine under Panther, although now that
there's a real implementation under Panther, it would be best to simply
call super's implementation if running under Panther or later, and do
the above only under Jaguar, since we can be sure that Jaguar isn't
going to change anymore. You can even use the same delegate unmodified
regardless of the OS version.
On Dec 8, 2003, at 7:08 PM, Simon Fraser wrote:
It's been often noted that tableView:didClickTableColumn: is not sent
to NSOutlineView delegates. I've seen suggestions for workarounds
involving outlineView:shouldSelectTableColumn: or doing work in the
action method, but these are not suitable, since they are called
on mouse down, and not mouse up.
I know this is a FAQ, but I have yet to see a reasonable answer.
I do note that on Panther there are outline view delegate methods
for this, but I need something that works on Jaguar too.
Any suggestions?
Thanks
Simon
_______________________________________________
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.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.