Re: Custom view, selection consistency with NSTableView
Re: Custom view, selection consistency with NSTableView
- Subject: Re: Custom view, selection consistency with NSTableView
- From: Paul Szego <email@hidden>
- Date: Mon, 18 Apr 2005 18:28:06 +1200
On 17/04/2005, at 10:27 PM, mmalcolm crawford wrote:
On Apr 17, 2005, at 2:47 AM, Paul Szego wrote:
My array controller has 10 objects, indexes 0 to 9.
1) I click on 0, the selection is (0)
2) I shift-click on 3, the selection in (0,1,2,3)
3) I command-click on 9, the selection is (0,1,2,3,9)
4) I shift-click on 7, what should the selection be now?
How to figure out the correct answer? The HI guide doesn't have
enough detail. By observing NSTableView it results in selection of
(0,1,2,3,7,8,9). Fine - I can try to generalise from that observation
into a rule to augment the HI guide.
I believe this is covered here:
<http://developer.apple.com/documentation/UserExperience/Conceptual/
OSXHIGuidelines/XHIGUserInput/chapter_2_section_4.html>
"A Shift-click should result in a continuous selection—the selection
is extended to include everything between the old anchor point and the
new active end."
It is, unfortunately, ambiguous. It does not specify what is the "old
anchor point" -- the original, or one defined by a previous
Command-click. A quick couple of experiments suggests that
interpretations differ in different applications (Cocoa table views
appear to allow the anchor point to be redefined by a Command click;
Finder, iTunes, and Keynote outline view extend from the original
point). I would suggest filing an enhancement request.
Ok - will do that.
So in the meantime, I should probably pick something to be consistent
with (say NSTableView for arguments sake) and mimc that. Whatever I
choose, I've got to basically guess the anchor point and and active end
(assuming the bhaviour I want to mimic needs that information) just
from the KVO notifications of changes to selectedIndexes from the
NSArrayController, and react accordingly if subsequent interaction is
via my custom view. Does that sound right?
Thanks, Paul.
_______________________________________________
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