Grrrr, how come I can't deselect in a list browser??

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Grrrr, how come I can't deselect in a list browser??

Eliot Miranda-2
Hi All,

    so I just noticed that there are a few methods which carriage returns in the time stamp, which is confusing and should be fixed, so I did this to get a list of said methods:

CurrentReadOnlySourceFiles cacheDuring:
[self systemNavigation browseAllSelect: [:m| m timeStamp includes: Character cr]]

Cool, now I have a list of the methods I need to file-out to quickly fix their time stamps and the list has the first method selected.  But no matter how many times I click on that method or any other the list browser resolutely refuses to deselect, completely sabotaging my useful modification of the file out item in list browsers, committed at least a year ago now, such that when nothing is selected all methods in the list get filed out.

I can find no preference which restores unselectability.  Can who ever changed this undo the change please?  I am /not/ going to sit there like a monkey and filter out each individual method.  Yes, I *could* try and deselect by inspecting the thing, but, you know what, I shouldn't have to, it should deselect like it used to, when I loved it like I used to.

_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

Chris Muller-3
Hi Eliot, its a bug that just needs to be fixed.  IIRC, the code is
there to make it (AlternatePluggableListMorphOfMany) work just like
windows:  Shift-click selects the b point of a range, Control-click
toggles under the mouse cursor.

But because Morphic hijacks the Control key override to present a menu
with a lot of duplicate items on it, the Control-toggle functionality
does not work.

In the meantime, there are a couple of workarounds:

1) select all the methods, then invert the selection (Shift+Command+I
"<--- capital eye").
2) select all the methods, then file them out?  Does that work?  If
not, it should.
3) Turn off the "traceMessages" preference, then re-run your script to
capture the methods.  The regular PluggableListMorphOfMany deselection
works.

HTH,
 Chris

On Wed, Sep 2, 2015 at 8:16 PM, Eliot Miranda <[hidden email]> wrote:

> Hi All,
>
>     so I just noticed that there are a few methods which carriage returns in
> the time stamp, which is confusing and should be fixed, so I did this to get
> a list of said methods:
>
> CurrentReadOnlySourceFiles cacheDuring:
> [self systemNavigation browseAllSelect: [:m| m timeStamp includes: Character
> cr]]
>
> Cool, now I have a list of the methods I need to file-out to quickly fix
> their time stamps and the list has the first method selected.  But no matter
> how many times I click on that method or any other the list browser
> resolutely refuses to deselect, completely sabotaging my useful modification
> of the file out item in list browsers, committed at least a year ago now,
> such that when nothing is selected all methods in the list get filed out.
>
> I can find no preference which restores unselectability.  Can who ever
> changed this undo the change please?  I am /not/ going to sit there like a
> monkey and filter out each individual method.  Yes, I *could* try and
> deselect by inspecting the thing, but, you know what, I shouldn't have to,
> it should deselect like it used to, when I loved it like I used to.
>
> _,,,^..^,,,_
> best, Eliot
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

marcel.taeumel
In reply to this post by Eliot Miranda-2
Hi Eliot,

just disable the preference "traceMessages". It makes MessageSet be replaced by MessageTrace, which uses a multi-selection list morph. That does not provide de-selection behavior.

But we seriously *must* fix that mess with having subclasses for different selection behavior in list morphs. There should only be one PluggableListMorph that supports the common selection modes.

You know, it's on my list. :P

Best,
Marcel

P.S.: Arf woof LeChuck!! GRRRRRRRRR!! Woof woof woof ruff ruff... Wor-roof wuf Governor Marley. A-OOOOOOOOOOOOO!!!!! Ruff ruff ruff bow-roo wuf rowwf arroof LeChuck, GRRRRRR!!!!! Arf oof-oof Monkey Island™! *sniff sniff*
Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

marcel.taeumel
In reply to this post by Chris Muller-3
Hi Chris,

no, Morphic does not hijack the control key, the VM does. It converts a control+leftclick into a right click... *sigh*

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

Chris Muller-3
In reply to this post by marcel.taeumel
> But we seriously *must* fix that mess with having subclasses for different
> selection behavior in list morphs. There should only be one
> PluggableListMorph that supports the common selection modes.

"*Must* fix"?  Really?  Its just 13 methods!  They're the very first
methods I ever wrote for Squeak back in January 2002, and have used
heavily ever since.  If the VM won't be fixed can't we just find
another fix for the deselection bug?

> You know, it's on my list. :P

This widget provides a specific set of low-level gestures optimized
for list pruning, which is what traceMessages needs.  If you go
"cleaning it up" and reducing it to a lowest-common-denominator
functionality, there really could be some woofing and barking around
here.   :)   Ha ha, no seriously, if you feel the need to clean it,
lets please review the usage cases, there are very good reasons I took
the trouble to write that instead of using the original..

Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

timrowledge
In reply to this post by marcel.taeumel

On 02-09-2015, at 11:00 PM, marcel.taeumel <[hidden email]> wrote:

> Hi Chris,
>
> no, Morphic does not hijack the control key, the VM does. It converts a
> control+leftclick into a right click... *sigh*

Oh, it’s not *that* simple. Different vms do different things, usually in the name of being helpful. There’s far too much low-level codewhere it seems obvious that person A thought the vm should deal with some issue and person B didn’t know, or disagreed, and so handled it in the image.

And, err, miaow.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: FSE: Fake Serious Error



Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

Chris Muller-3
In reply to this post by marcel.taeumel
Hi Marcel, I know what you are saying now, keep the same behaviors
with boolean options (or whatever) all in one class instead of
subclassing.  For a moment I thought you meant to simply delete
AlternatePluggableListMOrphOfMany (sheesh, what a name).  Sorry for
the poor humor.

Incidentally, the reason it is that kind of subclasssing mess is, back
in 2002, Squeak was being developed at a big company and one never
knew what the next version of Squeak would bring, so it was an
inhibiting factor for making very many base changes.  By making my own
subclass, I could keep my code separate.  Eventually it was integrated
into the base image, but left as-is because it had been simply working
for so long.

I'm trying to remember if there are any other differences in
requirements between the two other than the swipe gesture getting all
the elements -- maybe that would be a good behavior for where we use
the standard PluggableListMorphOfMany..?  (And fix the deselection, of
course).

On Thu, Sep 3, 2015 at 12:59 AM, marcel.taeumel <[hidden email]> wrote:

> Hi Eliot,
>
> just disable the preference "traceMessages". It makes MessageSet be replaced
> by MessageTrace, which uses a multi-selection list morph. That does not
> provide de-selection behavior.
>
> But we seriously *must* fix that mess with having subclasses for different
> selection behavior in list morphs. There should only be one
> PluggableListMorph that supports the common selection modes.
>
> You know, it's on my list. :P
>
> Best,
> Marcel
>
> P.S.: Arf woof LeChuck!! GRRRRRRRRR!! Woof woof woof ruff ruff... Wor-roof
> wuf Governor Marley. A-OOOOOOOOOOOOO!!!!! Ruff ruff ruff bow-roo wuf rowwf
> arroof LeChuck, GRRRRRR!!!!! Arf oof-oof Monkey Island™! *sniff sniff*
>
>
>
> --
> View this message in context: http://forum.world.st/Grrrr-how-come-I-can-t-deselect-in-a-list-browser-tp4847776p4847814.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

marcel.taeumel
I like this model for handling selection modes:
http://doc.qt.io/qt-4.8/qabstractitemview.html#SelectionMode-enum

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

Nicolas Cellier
But there doesn't seem to be a way to have none item selected in this model, does it?

If the intention is to file out all, the logic would indeed be to select all and operate on the selection.
Alas, allmost no action is multi-selection ready.
It's certainly valuable to have actions able to operate on multiple selections in the long term...
But in the short term it's not the simplest thing that could possibly work.

The change of Eliot was a quick hack, no selection <=> operate on all...
IMHO, the continuous-integration strategy should be to restore this behavior in the interim until the multi-selection is ready.

Cheers

Nicolas

2015-09-04 17:30 GMT+02:00 marcel.taeumel <[hidden email]>:
I like this model for handling selection modes:
http://doc.qt.io/qt-4.8/qabstractitemview.html#SelectionMode-enum

Best,
Marcel



--
View this message in context: http://forum.world.st/Grrrr-how-come-I-can-t-deselect-in-a-list-browser-tp4847776p4848084.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Grrrr, how come I can't deselect in a list browser??

marcel.taeumel
Both QAbstractItemView::ExtendedSelection and QAbstractItemView::MultiSelection support toggling selection states of individual items. Having this, no selection is possible.

Additionally, there is the concept of a current item (i.e. previously clicked).

Best,
Marcel