Re: Double-clicking multiple selection in a TableView
Re: Double-clicking multiple selection in a TableView
- Subject: Re: Double-clicking multiple selection in a TableView
- From: Brian Stern <email@hidden>
- Date: Wed, 7 Dec 2005 11:51:57 -0500
At 2:42 PM -0800 12/6/05, Corbin Dunn wrote:
>
> I realise that what is really happening is that the first click is
>
> the one that deselects everything. Wouldn't it be nicer if
>
> TableViews delayed the deselection until after the Double-click
>
> time has passed?
>
>
There is no easy way to do this. The underlying problem is that there
>
isn't enough NSCell API to determine if a click on a particular row
>
should deselect everything or not. Finder has does allow
>
doubleclicking and maintaining the selection, but it is done in a
>
subtle way; if you single/double click on some content (ie: an icon,
>
or a caption), it will maintain the selection. If you single/double
>
click on a non-content area, it will deselect everything except that
>
row.
It's not content exactly but whether the clicks occur within the existing
selection. A single click inside the selection does nothing visible. A
click outside the selection resets the selection.
Finder's implementation of this is a bit misleading. It displays the
selection as a rectangle of the line or lines selected. If you click on
the file/folder icon or name, what you are calling "content," it acts as
expected. If you click within the visible selection but outside the
file/folder icon or name it's as if it was a click outside the selection
and the selection is reset. Finder deceives you into thinking that the
area that is hilited is all within the selection when it acts as if only
part of it is.
As far as NSTableView is concerned I would think that since it also hilites
an entire cell or row to indicate the selection, that a click inside that
selection would do nothing visible. I don't think it has to differentiate
between the bounds of the cells and the content of the cells, the way
Finder does.
Also, XCode has this same bug in the file list in the project window,
Codewarrior does not.
>
>
Sorry, there isn't an easy way to do what you want without
>
reimplementing a lot of the mouseDown stuff.
>
>
--corbin
--
Brian Stern
email@hidden
_______________________________________________
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