Mantis - Squeak
Viewing Issue Advanced Details
5630 Morphic minor always 12-11-06 08:50 12-14-06 10:28
black  
 
normal  
new 3.9  
open  
none    
none  
0005630: It's impossible to deselect in the Browser class list pane
The list of class names in the system browser does not allow the currrently selected class to be deselecetd by a single mouse click. The other three lists of names do allow de-selection.

PluggableListMorph has a (misnamed) instance variable autoDeselect. This variable, when false, makes it impossible to deselect the selected list item. There is nothing wrong with that, except that the name should be changed to "isDeselectPossible".

The reason that this bug exists is because autoDeselect is false for the list of classes in the Browser.

Why is autoDeselect false? Because if it is true, then it is impossible to double-click on a name in the list.

I'm uploading the text of my email to squeak-dev and Jerome Peace's reply. He seems to know how to fix this; I don't.
related to 0007096new  PluggableListMorph>>mouseUp: sets index to 0 
 PluggableListMorphs email.txt [^] (8,127 bytes) 12-11-06 08:51
 ListRangeDeselect-wiz.3.cs [^] (2,099 bytes) 12-14-06 10:18

Notes
(0008648)
black   
12-12-06 02:21   
So I had another thought about how to fix this. Suppose that the action of a double-click on a PLM is to do the double-click action on the CLICKED list item, rather than on the selected list item. In the browser, the double-click action might be to (a) select the item and (b) browse the item.

So, if one double-clicks on a list element that is not selected, the first click would select it, and then the double click would (a) select it again and (b) browse it. This seems fine. If one double-clicks on a list element that IS selected, teh first click would de-select it, and the double click event would (a) select it and (b) browse it. This also seems fine.

So, with these actions, it becomes irrelevant whether an item is selected or not before it is double-clicked.

(0008713)
wiz   
12-14-06 10:28   
Hi Andrew,

Thanks for starting the report.

Uploaded
ListRangeDeselect-wiz.3.cs

From the preamble:

PLM allows double clicking to work by disabling autodeselect on click. So there was no way to get the deselected state back. This fix allows clicking on a blank item below the list to deselect the list. Theoretically it would work for a blank item above the list but there is no way to scroll that into visible range.

This is one general solution to how to deselect a list w/o autodeselection.

I sort of like your idea. But I am reluctant to make the list selection logic and the action logic interdependent on each other. In your scheme the model action would have to know about and change the list selection. Right now they are independent. And they should probably stay that way.

So let me know if my fix is sufficent or I leave it to you to come up with an implementation of the other scheme.

Yours in service, --Jerome Peace