[ANN] Gutenberg: a pretty printer for Smalltalk

Damien Cassou damien.cassou at laposte.net
Mon Jul 17 10:50:38 UTC 2006


Here is how VW formats this same method. This is much better in my opinion:


renderCategoriesOn: html 

    (html fieldSet)

        legend: 'Choose one or more categories';

        with: 

                [html unorderedList: 

                        [self allCategories do: 

                                [:category | 

                                html listItem: 

                                        [(html checkbox)

                                            value: (self belongsToCategory: category);

                                            onTrue: [self addCategory: category]

                                                onFalse: [self removeCategory: category];

                                            with: [html text: category asString]]]

                            separatedBy: [html break]]]






More information about the Squeak-dev mailing list