On 06 Mar 2015, at 11:04, Torsten Bergmann <astares@gmx.de> wrote:

Hi,

as we know in Smalltalk we use the concept of "messages" even to create new classes.

Beside the regular #subclass:instanceVariableNames:classVariableNames:category:
message there are other flavours and one even can implement such methods on his
own easily.

Just wondering:
Is it easily possible already that one can define (for instance for a common superclass)
that Nautilus displays the custom class creation message when a class is clicked:

Something like:

 HTMLTag
    subclass: HTMLAnchorTag
    tagName: 'a'
    category: 'HTML-Markup'

 HTMLTag
    subclass: HTMLFormTag
    tagName: 'form'
    category: 'HTML-Markup'

...

 Animal
    subclass: Cat
    genome: 'Felis catus'
    category: 'Pets'

I guess that would be highly useful for own custom DSL's and make modeling the real
world in standard Pharo tools like the browser even more attractive.

Any comments, use cases or code?


There is #definition in ClassDescription that you can override.
Right now Nautilus actually uses #definitionForNautilus which we need to clean
up:

https://pharo.fogbugz.com/f/cases/14063/clean-up-definitionForNautilus

This is sadly harder than it should be due to a mess of Monticello using FilePackage
to parse smalltalk code���

Marcus