Squeak – Filtering Items In Lists

Chances are – if you see a list in Squeak – it can be filtered.

For example any list you see in Browser.

Every instance of PluggableListMorphPlus in Squeak is capable of showing just a subset of items containing characters you type.

How it works.

Select the list first.

Then type the characters of a string you would like to find in the items in the list.

As you type the characters you have typed will be collected and the resulting string will be used to show only matching items in the list. Other items will be hidden. The matching substring will be highlighted in each item.

The search is case insensitive.

You need to type fast enough so that individual keystrokes are not too far apart for the sequence to be understood as a string of characters. If you type too slowly or make a pause in your typing any character you type after that will be regarded as the first character of a string to look for.

As you type, the first item in the filtered list will be selected. As if you have looked it up in the full list and selected it yourself.

This also causes some lists to be incompatible with this feature – because whatever it is that is done after an item is selected in the list just takes too long. Too long for the subsequent keystrokes to be appended to the previous ones and the whole thing falls apart.

When the list is filtered, you can see some characters highlighted with a yellow background.

After you have filtered a list by typing, you can select items in the filtered list by clicking with the mouse or by using the up/down, page up/page down, home/end keys.

If you want to go back to the full list you have two options.

One is  – press Enter – this way the item selected in the filtered list will stay selected and the list will show all items as it did before.

The other is – press Backspace – this way the item that was selected before you started typing will be re-selected and the list will show all items as it did before.

If you prefer videos have a look at Chris Muller’s tutorial.

External Links

A recent Squeak-dev discussion on filtering

A YouTube video by Chris Muller
Squeak IDE, the list filtering feature

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s