• 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
Setting a discontinuous selection in NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting a discontinuous selection in NSMatrix


  • Subject: Setting a discontinuous selection in NSMatrix
  • From: James Bucanek <email@hidden>
  • Date: Tue, 18 Jan 2011 19:45:56 -0700

Greetings,

I have an NSMatrix view that's driving me nuts. It's mode is set to NSListModeMatrix, which allows the user to click, shift+click, command+click, and drag to create arbitrary selections of cells.

I can get the set of selected cells by sending -selectedCells.

However, I can find no way of programmatically setting an arbitrary selection. Everything I've tried (-selectCell:, -selectCellAtRow:column:, even -[NSCell setState:]), either doesn't update the selection or only selects the last cell.

How can I set an arbitrary selection programmatically?

There's nothing in the documentation. Similar questions on the list have gone unanswered. I just can't believe that there's no way to do this. I mean, the user can do it, why can't a programmer?

TIA

P.S. I think NSMatrix should get an award for the most poorly documented class in the Cocoa framework. ;)

--
James Bucanek

_______________________________________________

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


  • Follow-Ups:
    • Re: Setting a discontinuous selection in NSMatrix
      • From: James Bucanek <email@hidden>
    • Re: Setting a discontinuous selection in NSMatrix
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Printing Appears Very Small in Lower-Left Corner of Page
  • Next by Date: Re: Setting a discontinuous selection in NSMatrix
  • Previous by thread: Re: Store a file vs create on the fly?
  • Next by thread: Re: Setting a discontinuous selection in NSMatrix
  • Index(es):
    • Date
    • Thread