• 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 and row selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView and row selection


  • Subject: Re: NSTableView and row selection
  • From: Julien Palmas <email@hidden>
  • Date: Thu, 31 Mar 2005 11:53:22 +0900


On Mar 31, 2005, at 11:30 AM, Julien Palmas wrote:

I am trying to achieve a certain behavior for my NSTableView, but I have some difficulties.

To illustrate what I want, let me give an example.
Imagine that my table view displays cars.
The car class contains the name of the car, and its color.
Let's say I have 3 red cars in my list
car A, car C, and car E.

when I clic on car A, I want all the red cars in the table view to get selected as well.
If I am not mistaken, I should only use a NSIndexSet to set the selection. This is not my tricky part.

Well, I thought this would not be that hard, but looks like I was wrong. If my tableView is not set to accept multiple selection in IB, the method [tableview <x-tad-bigger>selectRowIndexes:] </x-tad-bigger>only selected the last index !!

This is not in accordance with the documentation !
[cite]

<x-tad-bigger>- (void)setAllowsMultipleSelection:(BOOL)</x-tad-bigger>flag
Controls whether the user can select more than one row or column at a time. If flag is <x-tad-bigger>YES</x-tad-bigger> the user can select multiple rows or columns; if flag is <x-tad-bigger>NO</x-tad-bigger> the user can’t. The default is <x-tad-bigger>NO</x-tad-bigger>. You can select multiple columns or rows programmatically regardless of this setting.

[/cite]
 _______________________________________________
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

References: 
 >NSTableView and row selection (From: Julien Palmas <email@hidden>)

  • Prev by Date: trouble getting c-chars from NSString
  • Next by Date: Re: trouble getting c-chars from NSString
  • Previous by thread: NSTableView and row selection
  • Next by thread: trouble getting c-chars from NSString
  • Index(es):
    • Date
    • Thread