• 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: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
      • From: Corbin Dunn <email@hidden>
References: 
 >NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:? (From: Jim Correia <email@hidden>)
 >Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:? (From: Corbin Dunn <email@hidden>)
 >Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:? (From: Jim Correia <email@hidden>)
 >Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:? (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: Animated gif on 10.4..x
  • Next by Date: Re: Variables of super classes
  • Previous by thread: Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
  • Next by thread: Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
  • Index(es):
    • Date
    • Thread