• 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: Matt Neuburg <email@hidden>
  • Date: Fri, 03 Jun 2005 07:20:33 -0700

On Thu, 2 Jun 2005 22:08:55 -0400, Jim Correia <email@hidden> said:
>On Jun 2, 2005, at 5:50 PM, Corbin Dunn wrote:
>
>>> Is there any way to avoid this?
>>
>> okay, the simple answer is that we really need to add support for
>> this.
>
>Additional bug reports/requests not necessary?
>
>> the "work around" answer is to change your delegate method to below.
>>
>> Some comments: selectRowIndexes is called when the selection is to
>> really change. shouldSelectRow is lacking "byExtendingSelection",
>> as we already determined. To work around this, you can determine if
>> a drag is happening and the right thing should happen.
>
>Thanks Corbin. Your example didn't take care of the cases of
>extending the selection with shift arrows or shift/command clicking,
>but pointed the way. I modified it and it seems to work. I'll do some
>more testing to make sure I didn't miss an edge case, but so far so
>good.

I'd really like to see the final code for this. As I have lamented before...

<http://www.cocoabuilder.com/archive/message/cocoa/2004/9/2/116428>

...I've been stymied by the fact that even shouldSelectRow: arrives too late
or is even not sent under certain circumstances. I am forced to store the
selection state every time it changes, and use tableViewSelectionDidChange
to undo whatever the user did - visibly, and after the fact - if I
disapprove of it. If you've solved the problem, I'd like to see the
solution. Thanks! m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
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>
  • Prev by Date: Re:linking to a styled private framework
  • Next by Date: Re: Bug in NSImageView / NSPDFImageRep in Tiger?
  • Previous by thread: Re: CoreData: Using willSave to update timestamps causes hang?
  • Next by thread: Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
  • Index(es):
    • Date
    • Thread