SimpleButtonMorph - 'quit' example
Last updated at 6:18 pm UTC on 14 January 2006
The following example shows how to use a SimpleButtonMorph - 'quit' example to create a button which quits the .changes file without saving it. This may be useful in a kiosk application where you want to provide an easy way to quit the application while not actually changing the image.
s := SimpleButtonMorph new.
s target: ClassBuilder .
s label: 'quit'.
s actionSelector: #snapshot:andQuit:.
(s arguments: (Array with: false with: true)) openInWorld.
or the same code written with cascading:
(SimpleButtonMorph new
target: Smalltalk;
label: 'quit';
actionSelector: #snapshot:andQuit:;
arguments: (Array with: false with: true))
openInWorld