Squeak
  links to this page:    
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
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