Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
- Subject: Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
- From: Jim Correia <email@hidden>
- Date: Thu, 2 Jun 2005 14:36:33 -0400
On Jun 2, 2005, at 2:09 PM, Corbin Dunn wrote:
That did not work. I implemented
- (void)selectColumnIndexes:(NSIndexSet *)indexes
byExtendingSelection:(BOOL)extend
{
NSLog(@"%s", __PRETTY_FUNCTION__);
[super selectColumnIndexes: indexes byExtendingSelection:
extend];
}
Did you try selectRowIndexes? The above is selectColumnIndexes.
Doh. If I had a nickel for every bug which came about because of cut
and paste...
That works great, with one exception. I wrote a sample which
disallows selecting of the first or last row if other rows are selected.
If I shift or command click, it works as expected. If I drag select,
as I drag over rows which are disallowed from the selection set, they
get temporarily highlighted.
I put together a sample:
http://homepage.mac.com/jimcorreia/TableViewSelectionTest.zip
(To reproduce, click the add button a few times, edit the names in
the row, then drag select the rows.)
Is there any way to avoid this?
Thanks for your help!
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden