|
Class: ActionWaitBox
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--TopView
|
+--StandardSystemView
|
+--ModalBox
|
+--DialogBox
|
+--ActionWaitBox
- Package:
- stx:libwidg3
- Category:
- Views-DialogBoxes
- Version:
- rev:
1.7
date: 2017/03/15 16:23:43
- user: mawalch
- file: ActionWaitBox.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
ActionWaitBoxes are boxes which block the caller while some action
is performed. For example, when some long time computation is performed,
an instance of myself can be shown on top of the busy view, to
let the user know what is going on.
See examples for a concrete application.
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
action: aBlock
-
set the block to be performed by myself
realization
-
abortPressed
-
sent by the cancel button; user pressed abort button
- hide myself and evaluate okAction
-
openDoing: aBlock
-
-
realize
-
(comment from inherited method)
if any inputFields were added, activate the first one
|box label images|
box := ActionWaitBox new.
box label:'computing ...'.
label := AnimatedLabel new.
images := Array new:12.
1 to:12 do:[:i |
images at:i put:(Image fromFile:'bitmaps/write.' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
box addComponent:label.
(box addAbortButton) label:'abort'.
box action:[
1 to:20 do:[:run |
1000 factorial.
run printNL
].
].
box openWithExtent:100@100.
|
|box label images|
box := ActionWaitBox new.
box label:'computing ...'.
label := AnimatedLabel new.
images := Array new:12.
1 to:12 do:[:i |
images at:i put:(Image fromFile:'bitmaps/write.' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
box addComponent:label.
(box addAbortButton) label:'abort'.
box openDoing:[
1 to:20 do:[:run |
1000 factorial.
run printNL
].
].
|
|