Monthly Archives: June 2015

DragPanels: Floating palette windows with drag-and-drop in Morphic

Morphic offers everything needed to create highly interactive applications in Pharo. It is however, difficult to find out how to actually create those applications. Morphic tutorials provide a starting point, and are not very good at showing how the different features interact and are supposed to be used together. Morph has lots of methods, and some of them are not in the method category where you might expect them. The result is that most Morphs in Pharo do not use much of what Morphic has to offer.

Wouldn’t it be great if there would be some sample code, showing how Morphic can be used to great effect?

Well, here is some code that takes a first step towards that goal.
DragPanels shows how to create a floating palette, filled with
wells that support dragging a property towards a target. It shows how to combine drag-and drop with click: and context menu actions, and show  to give UI feedback when over a well and when holding the mouse down over an element that reacts to click:.

You can see the code in action here:

The color panel shows some colors. If you don’t set the allowDropBlock,
it will work with any morph that responds to #color: (like the world).
By clicking on the plus, you can add more colors to the panel. The panel has a context menu to restore the default values.

ColorPanel withSevenPaleColors
allowDropBlock: [ :source :target |
target class = CardMorph ];

The people panel shows avatars belonging to an email addres. By default it uses gravatar for them, and caches the images.

PeoplePanel new
allowDropBlock: [ :source :target |
target class = CardMorph ];

When dropping, the dragSource sends #color: resp. #email: to the  target by default. By setting the dropSelector of the DragWell this
can be overridden.

You can try the code by do-ing

Gofer new
smalltalkhubUser: ‘StephanEggermont’ project: ‘Dragpanels’
package: ‘DragPanels’;

It is used in (a work in progress)

Gofer new
smalltalkhubUser: ‘StephanEggermont’ project: ‘Documentation’
package: ‘CardsMorphic’;



On the wishlist are
– add more color palettes
– add a dark theme, refactoring the colors
– add a small close cross in the title bar of the palette
– define the dropSelector in the panel, not the well
– support different sized wells, refactoring the sizes
– make the mouseOver rectangle color content dependent
– add pharo contributors as an avatar source
– add a configuration

Choose your high goal and tell its story through the system that you build


I gave last week a talk at NDC Oslo on “Don’t demo facts. Demo stories!”. While the talk is less technical, I did exemplified the message by demoing Spotter in comparison with the search support from Eclipse.
There are several things I would like to emphasize.
I compared our solution with an “industry standard” one. We often think our system as being niche and perhaps not mature enough. We need to change that perception about our work. We build state of the art.
One thing that I did not mention explicitly in the talk is the size of the implementation. The Spotter implementation is 3500 lines of code — and that it is so large because it currently comes with its own widgets. Furthermore, the extensions average 8 lines per custom processor (including the method header and the pragma). This is orders of magnitude smaller than what is typically out there, and it is precisely the reason why we can compete even if we are fewer.
But, to get out there and compete we have to set that high goal for ourselves. For example, with GT we do not want to compete. We want to outcompete. So can you.
While details are important, high goals require us to get away from those details. Only polishing details will tend to limit you to incremental improvements. We need to jump from time to time. But, these jumps are hard. On the one hand, it is hard to find the right jump and convince people to jump with you. On the other hand, they are hard to predict. For example, Spotter would have not been predictable one year ago.
Yet, dry goals are not enough to keep us going. We need stories that make us dream. And the beauty is that Pharo breaths such a story. We should not limit ourselves to that story only. For example, with GT we want to reinvent the developer experience by making the developer be able to mold visual tools to her context because that is the only effective way to build sustainable systems. This little point of view will turn the IDE upside down, and this is only possible in a system like Pharo.
Choose your high goal and tell its story through the system that you build. And remember that Pharo already offers a beautiful story to start from.

Sonar importer for Moose


I would like to announce that I developed a Sonar importer to get sonar data into a Moose model.

It imports the list of metrics and projects available in the Sonar repository.

On demand, it imports chosen metrics for all the projects. I let you see the tests and documentation to check the behavior of this importer.

The configuration is on the Pharo catalog, so it is very easy to load it (else the repo is here).

The importer is based on the public Sonar REST API Version 3.7.2, but should work with recent ones.

Don’t hesitate to contribute if you want to add new features, the project is in public access!



Pharo is pulsing steady and regular

15831 Replace PluggableTextMorph with RubScrolledTextModel in Nautilus for source code

15832 Integrate new FastTable
15568 removeClass does not work for Last modified/Most viewed DynamicGroups

15827 Update Rubric

15272 RBPatternMessageNode>>match:inContext: SubscriptOutOfBounds
12728 requestImplementorToInline: is missing in NautilusRefactoring

15828 NECController must check that its editor morph is not nil before unsubscribing from it

15826 Clean up discouraged uses of SourceFiles and friends (10)

15825 Move Reflectivity changes from Opal into a Opal translator subclass (part1)

15824 Clean up discouraged uses of SourceFiles and friends (9)

15823 Clean up discouraged uses of SourceFiles and friends (8)
15818 Clean up discouraged uses of SourceFiles and friends (7)

15813 Reflectivity: #value for ReturnNodes

15812 MessageNotUnderstood: RGMethodDefinition>>ast (Suggestions expects it)

15791 Cleanup Script actions for methods

15557 New PackageManifests should be classes, not instances

15809 Update Rubric
15806 Clean up NautilusRefactoring

15805 support #newValue on assignmentNode + cleanups

15807 Revisiting RBUnpackagedCodeRule

15801 MorphTreeMorph improvement

15801 MorphTreeMorph improvement
15799 replace last #gather: reference

15800 Fix concurrency problem with RemoteString

15795 Playground enter does not work well anymore

15793 Better comment for Margin

13463 Monticello Browser doesnt scroll packages correctly

15789 Progress with reifications

7367 Nautilus Colors “not in this package” methods differently on instance/class sides

15794 Clean up discouraged uses of SourceFiles and friends (5)
15788 Clean up discouraged uses of SourceFiles and friends (4)

15785 Fix do it etc in class comment in Nautilus
15783 First cleanup of Workspace

15778 The meaning of command-click (apple-click) on class names changed from Browse class to References to class

15779 Clean up discouraged uses of SourceFiles and friends (3)

15724 RB lint rules should not directly query the system dictionary
15754 New Code Critic for unary “accessing” methods without explicit returns

15739 lastKeystroke broken

15146 Spec TabManagerModel>>selectedTab: aTab manipulates with Morphic tab

15781 Fix TraitMethodDescriptionTest>>testArgumentNames
15776 Clean up discouraged uses of SourceFiles and friends (2)

15681 Manifest-CriticBrowser

15775 remove some “halt” that where left over

15765 OrderedCollection>>#at: and #at:put is slow

15753 wrong styling for comments

15770 Methods are in wrong protocol on ThemeIcons

15711 The File Browser has a Context Menu “Workspace with Contents”. It opens an Edit Window (String Morph), but not a Workspace …
15276 radioUnselectedFormContents and radioSelectedFormContents broken in Pharo3UIThemeIcons

15766 remove explicit isKindOf: PluggableTextFieldMorph in rubric

15767 remove explicit isKindOf: PluggableTextFieldMorph

15761 remove package Tool-Browser-Old

14614 FileList is not working

15640 Call to obsolete method in LinearGradientPaint class
15746 clean up RPackage-SystemIntegration

15681 Manifest-CriticBrowser

15718 Remove StringHolder

15532 Methods in Object category drag and drop should be a Morphic extension
15660 Add String methods for removing prefix/suffix

15756 Move FileStream usages to File and Friends

15759 Remove debug code from ASMJit

15718 Remove StringHolder
15740 openInWorld: aPasteUpMorph raises MNU PasteUpMorph>>startSteppingSubmorphsOf:

15726 unimplemented methods for new change list

15720 RubTextEditor references StringHolder
15741 PluggableTextMorphWithLimits should be removed

15749 RB: Dont Add Parens Around Lit Array Elements

15751 catalog (with spotter) needs to show projects after classes and packages

15752 make browsing versions of removed methods working again
15745 add API to enumerate AST nodes

15747 cleanup tools to get rid of undeclared

15748 Reflectivity: fixes for reifications

15703 integrate new Catalog Browser

15735 Start to move RPackage-SystemIntegration to into RPackage

15744 CatalogBrowser moved to PharoExtras

15742 Small clean up in ChangesBrowser

15636 PharoTutorial contents

15731 Kill the last two #asTimeStamp methods

15734 More tests for reifications



NeoConsole is a small, standalone package that offers a command line (a.k.a. a REPL) interface to a headless Pharo image.

It contains a number of extendable commands and metrics that allow you to execute arbitrary Pharo code for result (introspection and debugging) or side effect (to manipulate the live, running image). There is a history mechanism, you can refer to previous evaluation results and there is a primitive describe mechanism (like a one level inspect). The metrics system allows you to consult a number of predefined values. There is decent error handling.

Here is a screencast showing how this feels in practice:

The movie shows how to start from scratch, downloading Pharo, installing NeoConsole, running a headless image with the REPL installed in the background. Next, an HTTP server is added to the image and later a specific response is added as well. (You can speed up the movie, if you want).

Obviously this has been done before, and this is not the definitive solution in this area. For example, readline support (allowing you to edit your input) would be fantastic. A true command line inspector and debugger would be super as well. These are standard features in Lisp and would be totally possible in Pharo too.

I just needed this for myself, liked the result and thought it would be worth sharing.



Security warning: this service opens up your image for access to those with access to your local network (i.e. those logged in to your machine), without any further authenication, allowing them to do absolutely anything. Think and make sure that you know what you are doing.

Amazing blogs about Pharo


I wanted to say that I love these two blogs:

Excellent job!


nanomsg is a simple, fast socket abstraction library that supports many communication patterns (“scalability protocols”).

NanoStrand is a gate to the nanomsg world for Smalltalk users. Since there are many language-bindings for nanomsg, integrations with other network programs would be much simpler via NanoStrand.

The project page includes a nice description on how to use it in Pharo.


The application displays maps of historical events and is described here. It uses data from WikiData. If you have a Q-ID from Wikidata you can paste the ID and after importing the data the map is automatically generated.

The application is written in Seaside on top of Pharo and is hosted on PharoCloud.




New Tool: Catalog Browser in Pharo 5.0


maybe you already noticed. The latest update for Pharo 5 which is 50103 (see [1]).
includes a new tool called "Catalog Browser". 

Where to go

You will find it under "Tools" -> "Catalog Browser" and it will display the
configs together with the catalog metadata like project description.

The code is managed with a configuration similar to what we have for
a few other packages/projects. The tool was written by Esteban Lorenzano with small 
improvements like spotter integration from my side. Feel free to contribute more features.

The repository can be found on SmalltalkHub [2].

This new tool basically gives you access to all available configurations
aggregated at [3]. You can use a small UI to search and load the configs
(see world menu -> "Tools" -> "Catalog Browser".

But you can also use Spotter to load a config. 

Example on how to load ScriptManager config: 
 - open Spotter (SHIFT + ENTER on Windows, ...)
 - type in "Script" and you will find a spotter category "Catalog Projects" with "ScriptManager" in it
 - just hit enter and the config is loaded

Same for all others, so try with "Seaside", "MongoTalk", ...

In the short/mid-term this new tool should replace the existing config browser as it
gives more informations about the projects.   

What to do next:
catalogBrowser- give feedback
- we should update all our configs with catalog descriptions
- it would be nice if the spotter integration would include also a preview of the project
- ...

If you want to contribute just tell Esteban so he can add you to the project.

Esteban & Torsten


Already 100 updates for Pharo50


10803 Aliasing a method to a non-existent method breaks Browser

15728 Meta support in keymapping

15730 tests for #value (Global, Temp) and fix: allow tests to be run multiple times

15708 Deleting a class with nautilus raises an error

12736 Text Selection Not Updated

15694 Browse versions does not take focus

12775 Nautilus: Performance problem when selecting group with many classes

15723 It would be nice if Kernel-Traits (e.g. TClass) dont use #class because its too low level

15722 Remove unused method -= in SHParserST80

15725 SystemNavigation shouldnt use Smalltalk globals for self environment

15721 Reflectivity: add #name reification for Variables

13180 Class class>>superclassOrder: should preserve classes order

11711 Remove CodeHolder

15719 Remove ChangeList

14013 no package information for class side trait methods

15197 remove unnecessary menu item in MC

15710 ExternalChangesBrowser should register to serviceFiles

15709 Remove FilePackage and PseudoClasses

15708 Deleting a class with nautilus raises an error
7472 Remove old Browser

15714 Reflectivity: add #newValue reification for variables

15715 Character>>#serializeOn: needs to use accessor to value

15712 Remove FileContentsBrowser

15658 Prepare FilePackageRemoval and FileContentsBrowser
15159 Move file drop handlers to morphic

15701 Remove browse compressed changes

15655 a MCWorkingCopy(ConfigurationOfRubric)

15285 Clean endianness detection

15700 rollback latest font changes, until we have a real solution

15686 add missing editor shortcuts to class PharoShortcuts

15698 do not load package from cache if version info differs

15693 refactoring of GTAnnouncement to have less duplication

15679 Writing only one quote at the beginning of a method produces a syntax error.

15685 Adapt font color to current theme in Rubric

15664 Merge category method into group in RBRule
Cleaning method category api should be protocol (part 1)
15684 reduce direct references to PharoClassInstaller

15677 Remove ComposableModel>>#instantiateModels:s senders in Spec-Debugger

15673 Remove ComposableModel>>#instantiateModels:s senders in Spec-PolyWidgets

15674 Clean Nautilus icons and fixed missing class variables

15661 KeymapBrowser should have an icon

15683 Fix prompt for cancel in class comment pane
15644 empty comment pane in nautilus

15671 remove OldClassBuilderAdapter

15668 Old caseOf: patterns still in use
15670 Integrate new version of code importer for 15658
15666 Class rename does not update references in class-side methods

15659 LucidaGrande font should be installed just in Macs

15535 break circular reference for keymappings

15529 add Character space to the special km single Keycombination class

15657 Empty UDP packets are not sent

15665 Remove ComposableModel>>#instantiateModels:s senders in Manifest-CriticBrowser

15629 Remove ComposableModel>>#instantiateModels:s senders in HudsonBuildTools20

15650 Remove ComposableModel>>#instantiateModels:s senders in Spec-Tools

15634 TestRunner refers to categories and should use packages instead

15632 Integrate latest version of CodeImporter

15609 dnu RBParserErrorNode addParenthesis

15625 file out broken due to refactor of adaptToNumber:andSend:

15643 Remove ComposableModel>>#instantiateModels:s senders in Spec-Core

15642 Remove ComposableModel>>#instantiateModels:s senders in Tool-ConfigurationBrowser

15644 empty comment pane in nautilus

15639 rubric has a lot of hardcoded defaults (for colors, etc.)

15138 inprecise interpolateTo:at: for floats
15627 menuShortcutModifierString needs to answer ctrl for windows and linux

15598 Morphic – Cant go back directly to the first menu when more than 2 submenus are opened.

15630 Remove duplicate shortcut definition (TextEditors actionMap vs KM)

15637 Fixed nautilus tests

15633 FT2Handle needs to cleanUp on exit, not on startup

15631 Change PluggableTextMorph in comment pane into a RubScrolledTextMorph via RubScrolledTextModel