eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ToggleController':

Home

everywhere
www.exept.de
for:
[back]

Class: ToggleController


Inheritance:

   Object
   |
   +--Controller
      |
      +--ButtonController
         |
         +--ToggleController
            |
            +--RadioButtonController

Package:
stx:libwidg
Category:
Interface-Support-Controllers
Version:
rev: 1.13 date: 2001/12/14 10:57:30
user: cg
file: ToggleController.st directory: libwidg
module: stx stc-classLibrary: libwidg
Author:
Claus Gittinger

Description:


ToggleControllers redefine some of ButtonControllers behavior;
user interaction: they always triggerOnDown, and ignore buttonrelease.
Finally, every buttonPress leads to a toggle action.

ToggleController adds another actionBlock, since it inherits press-
and releaseActions, while we want one actionBlock to be used for both
on- and off. The actionBlock (if any) is evaluated with the current
toggles state if it expects an argument, or without argument if its a no-arg
block.

Other than that, all model relations are inherited - i.e. if the view has a model,
that one gets change-messages and the toggle updates on aspect changes.


Instance protocol:

accessing
o  action: aBlock
set the action to be performed. This is called
with the toggles state as argument.

events
o  performAction
the toggle changed its state; first tell the model and
channels, then evaluate any (optional) press/release actions,
finally evaluate my real action, the toggle action.
Individual press/release actions are usually nil for toggles.

initialization
o  initialize



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 21:40:21 GMT