Setting a discontinuous selection in NSMatrix
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