Search code examples
smalltalk

Can you extend the Button class and other GUI elements in Smalltalk?


Many times I have read books on architecture, citing examples in the Smalltalk language. I do not understand about the Smalltalk gui (button, textfield). In Smalltalk, can you extend the Button class and other gui?


Solution

  • Most (all?) Smalltalk dialects gives you direct access to the source code of the environment itself, which means you are free to change it, break it, and extend it as you see fit. This applies to most things… GUI, Collections, the language parser, swap the values of true and false, and much more.

    This gives you immense power, but of course if you are changing core components (e.g. the language parser) you must exercise extra care — it is a live system and any change to the system will usually immediately take place.