Last updated at 10:52 pm UTC on 24 February 2017
You can write "fake scripts" for some kinds of objects, avoiding the need for Players, by setting BlockContexts as the target for pluggable morphs. For example, let's say you want to load a remote piece of code from a project:
b := SimpleButtonMorph new.
b label: 'Load updates'.
b target: [HTTPSocket httpFileIn: 'http://example.com/squeak-updates.st'.].
b actionSelector: #value.
You can have a lot of fun with this. In this way, you can create "scripts" behind buttons and other pluggable morphs that do just about anything. The blocks that are attached to the buttons will be saved and loaded with your project, just like any other object.
See also A block as the target of a SimpleButtonMorph