How to create a 'go back to previous project' button
Last updated at 4:05 pm UTC on 12 November 2017
This example shows how to configure a SimpleButtonMorph so that when pressed the previous Project is activated.
Put the code into a Workspace, select it, and choose 'do-it':
s := SimpleButtonMorph new.
s target: Project current world
s label: 'prev'.
s position: 20 @ (Display height - 40).
s actionSelector: #goBack.
This creates a 'go-to-previous-project' button. It may be handy to move it into a parts-bin for easy access and copying in other projects.
1. Put the following code into a workspace and select it.
Project current world goBack
2. Then choose 'button for it' from the menu.
3. Then bring up the Halos for the newly created button and change the label to 'prev'.