eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ActionWaitBox':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ActionWaitBox


Inheritance:

   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
Author:
Claus Gittinger

Description:


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.


Related information:

    AnimatedLabel
    ProgressIndicator

Instance protocol:

accessing
o  action: aBlock
set the block to be performed by myself

realization
o  abortPressed
sent by the cancel button; user pressed abort button
- hide myself and evaluate okAction

o  openDoing: aBlock

o  realize


Examples:


    |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
                ].
               ].


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 20 Apr 2024 12:32:31 GMT