[squeak-dev] Examples of PluggableMultiColumnListMorph configuration

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Oct 17 18:03:53 UTC 2019


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 ... 🤔

________________________________
Von: Squeak-dev <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
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
>
> 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/20191017/ccad0c5f/attachment.html>


More information about the Squeak-dev mailing list