Groups
Groups
Sign in
Groups
Groups
Cappuccino & Objective-J
Conversations
Labels
About
Send feedback
Help
multiple selection
36 views
Skip to first unread message
Cameron Westland
unread,
Mar 16, 2009, 9:14:10 PM
3/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cappuccino & Objective-J
I posted this over on the development list. I didn't realize there
were two separate things:
I've added a couple commits to my fork of Cappuccino that enables
multiple item selection on CPCollectionView. You could always
programatically select multiple things by passing a CPIndexSet into
setSelectionIndexes:.
Here is what I've added:
toggleIndexInSelection:
http://github.com/camwest/cappuccino/commit/04abd8bad1f3ab870e7d01287.
..
selectRangeFromIndex:toIndex:
http://github.com/camwest/cappuccino/commit/8a471cc838c029fd0c90e1b13.
..
Minor Code Tweaks:
http://github.com/camwest/cappuccino/commit/e674dbd99629504502f7c3ddf.
..
http://github.com/camwest/cappuccino/commit/7bc879b20d1e4627a1cc178cc.
..
Lighthouse Bug:
http://cappuccino.lighthouseapp.com/projects/16499-cappuccino/tickets.
..
Basically I copied the rules from a Mac OS X NSCollectionView as
follows:
* Clicking an item while holding CPCommandKeyMask will toggle the
selection of the new index on or off.
* Clicking an item while holding CPShiftKeyMask will extend current
CPIndexSet to include a the range from the last selected index to the
current index.
* Single clicking a new item will de-select.
Also these will not work correctly unless the CPCollectionView
setAllowsMultipleSelection: is set to YES.
Also CPCollectionView's setSelectable: is now obeyed correctly.
Reply all
Reply to author
Forward
0 new messages