[squeak-dev] Examples of PluggableMultiColumnListMorph configuration

Marcel Taeumel marcel.taeumel at hpi.de
Wed Oct 23 14:46:47 UTC 2019


Hi, all.

Find a first version of that in Trunk. Let me know it it is somewhat intuitive enough. It's easy to change.

Usually, arrow keys are reserved for selection/navigation in such widgets. Here, we are talking about filter configuration instead. So, I opted for the [Tab] key to cycle between columns for filter configuration. Restricting the filter to the current (multi) selection would be a different challenge...

Best,
Marcel
Am 19.10.2019 04:52:05 schrieb Chris Muller <ma.chris.m at gmail.com>:
On Thu, Oct 17, 2019 at 1:03 PM Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de [mailto:Christoph.Thiede at student.hpi.uni-potsdam.de]> wrote:

Could we use the right and left arrow keys here? (more intuitive)
For example: When filtering is active, arrow right selects first column, then second, third, ..., last column, and then nothing special again. Filtering is then restricted to the selected column.
However, this would need some additional formatting ... 🤔

Yes, that's more intuitive (even though not reachable with hands at the home row, no biggie  :)  ).  It'd have to support both cases though, of when a filter is already present, and when it isn't.  With an existing filter, I guess the whole list contents could change with each press of the arrow, including possibly an empty list for a particular column.  [Backspace] in list-filtering is supposed to invoke, "return to the selection prior to starting the current filtering", so that'd have to include the column selection, if any, too..

 - Chris
 
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-bounces at lists.squeakfoundation.org]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 17. Oktober 2019 19:37:16
An: The general-purpose Squeak developers list; ma.chris.m at gmail.com [mailto:ma.chris.m at gmail.com]
Betreff: Re: [squeak-dev] Examples of PluggableMultiColumnListMorph configuration
 
Would Work If space does Not toggle a multi-selection state. 😁



On Wed, Oct 16, 2019 at 11:23 PM +0200, "Chris Muller" <asqueaker at gmail.com [mailto:asqueaker at gmail.com]> wrote:


A suggestion for column-specific list-filtering for PluggableMultiColumnListMorph:

   - when the filter string starts with one space, the remainder of the filter string matches on the first column only
   - when the filter string starts with two spaces, the remainder of the filter string matches on the second column only
   - etc.
   - when the filter starts with a non-space character, the whole string applies and all columns are searched

Best,
  Chris

On Tue, Oct 15, 2019 at 7:54 AM Marcel Taeumel <marcel.taeumel at hpi.de [mailto:marcel.taeumel at hpi.de]> wrote:

... so, you need a model that can provide both the list and the selection:

PluggableMultiColumnListMorph
   on: model
    list: #list
    selected: #selectedIndex
    changeSelected: #selectedIndex:.

Hmm.. there is no quick way to try this out in a Workspace. We could use a dictionary-like object that reads and stores data on #doesNotUnderstand:. :-) Then you wouldn't have to implement a new class for such models.

Best,
Marcel
Am 15.10.2019 14:51:04 schrieb Marcel Taeumel <marcel.taeumel at hpi.de [mailto:marcel.taeumel at hpi.de]>:
You need a selection for that. That's what you navigate: the selection.

Best,
Marcel
Am 15.10.2019 14:00:03 schrieb H. Hirzel <hannes.hirzel at gmail.com [mailto:hannes.hirzel at gmail.com]>:
Yes,

I wonder how I enable the navigation keys (cursor keys plus page up / page down)

--Hannes

On 10/15/19, Marcel Taeumel wrote:
> Thanks for the pointer. I added that "| ... |" just for documentation. You
> are right, it impedes experimentation in the workspace.
>
> Best,
> Marcel
> Am 15.10.2019 11:48:01 schrieb H. Hirzel :
> Hi Marcel
> It works fine.
>
> Note that if you do not define
> - model
> - view
> as block variables | model view |
> and thus have them as workspace bound variables you may execute single
> statements later on the same morph and thus see the effect of the
> statement dynamically applied.
>
> More: https://wiki.squeak.org/squeak/6629 [https://wiki.squeak.org/squeak/6629]
>
> Kind regards
> Hannes
>
> On 10/15/19, Marcel Taeumel wrote:
>> Hi, all.
>>
>> Update your Trunk image and try this:
>>
>>
>> | model view |
>> model := {
>> SystemNavigation default allClasses collect: #name.
>> SystemNavigation default allClasses collect: #category.
>> }.
>>
>> view := PluggableMultiColumnListMorph
>> on: model
>> list: #yourself
>> selected: nil
>> changeSelected: nil.
>>
>> view extent: 200 at 300.
>> view listFilterSet: 'Hand'.
>>
>> view openInHand.
>>
>> "Play around with horizontal alignment."
>> view listMorphs first cellPositioning: #rightCenter.
>> view listMorphs second cellPositioning: #center.
>> view listMorphs do: [:col | col cellPositioning: #leftCenter].
>>
>> "Play around with margins."
>> view listMorphs do: [:col | col cellInset: 0].
>> view listMorphs do: [:col | col cellInset: 3 at 0].
>> view listMorphs do: [:col | col cellInset: 5].
>>
>> "Funny but not useful."
>> view listMorphs first cellInset: 3. view listMorphs second cellInset: 0.
>>
>> "Fit all contents."
>> view listMorphs do: [:col | col
>> hResizing: #shrinkWrap;
>> vResizing: #shrinkWrap]. "always set anyway"
>> view
>> hResizing: #shrinkWrap;
>> vResizing: #shrinkWrap.
>> "Enable horizontal scrolling"
>> view
>> hResizing: #rigid;
>> hScrollBarPolicy: #whenNeeded;
>> width: 100.
>> "Disable horizontal scrolling"
>> view hScrollBarPolicy: #never.
>>
>> Best,
>> Marcel
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191023/815114a7/attachment.html>


More information about the Squeak-dev mailing list