Re: Finding clicked row in NSOutlineView
Re: Finding clicked row in NSOutlineView
- Subject: Re: Finding clicked row in NSOutlineView
- From: Tito Ciuro <email@hidden>
- Date: Mon, 13 Oct 2008 18:28:04 -0700
Hi James,
On Oct 13, 2008, at 6:23 PM, James Walker wrote:
I need to be notified when a row of an NSOutlineView was clicked,
and find out which row. Do I need to subclass it? Just thought I'd
ask, since I've read that new Cocoa programmers might tend to
subclass more than they ought.
The NSOutlineViewSelectionDidChangeNotification is not sufficient,
because in the case of a modified click that causes a multiple
selection, I need to know the individual row that was clicked.
Check - (void)outlineViewSelectionDidChange:(NSNotification
*)notification:
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
{
NSInteger row = [mOutlineView selectedRow];
...
}
Don't forget to set the delegate.
-- Tito
_______________________________________________
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