Inspector actions

The Inspector not only allows you to extend it with Inspector views, it also allows you to define actions.

The actions are defined, similar to views, through a method annotated with a gtAction pragma. For example, GtLudoRecordingGame>>#gtAutoplayAction: gtAutoplayAction: anAction <gtAction> ^ anAction button tooltip: 'Autoplay one move'; priority: 20; icon: BrGlamorousIcons go; action: [ :aButton | self autoPlay: 1. aButton phlow spawnObject: self moves last ] defines such an action. You can see it in the inspector when inspecing an instance of GtLudoRecordingGame GtLudoGame subclass: #GtLudoRecordingGame instanceVariableNames: 'moves' classVariableNames: '' package: 'GToolkit-Demo-Ludo-Model' .

See more examples in this list:

#gtAction gtPragmas