eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'EnterBox2':

Home

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

Class: EnterBox2


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--TopView
                  |
                  +--StandardSystemView
                     |
                     +--ModalBox
                        |
                        +--DialogBox
                           |
                           +--EnterBox
                              |
                              +--EnterBox2

Package:
stx:libwidg
Category:
Views-DialogBoxes
Version:
rev: 1.29 date: 2021/01/20 14:38:31
user: cg
file: EnterBox2.st directory: libwidg
module: stx stc-classLibrary: libwidg

Description:


Historic note:
     originally, ST/X had separate classes for the various entry methods;
     there were YesNoBox, EnterBox, InfoBox and so on.
     In the meantime, the DialogBox class (and therefore its alias: Dialog)
     is going to duplicate most functionality found in these classes.

     In the future, those existing subclasses' functionality is going to
     be moved fully into Dialog, and the subclasses will be replaced by dummy
     delegators. (They will be kept for backward compatibility, though).

 An EnterBox2 is like an EnterBox but with 2 action buttons.
 This is used (for example) in the search-boxes, where two ok-buttons
 'find-previous' and 'find-next' are needed in addition to the abort button.
 The protocol is like that of EnterBox, the additional buttons label
 can be set with 'okText2:aString' and its action with 'action2:aBlock'.

copyright

COPYRIGHT (c) 1991 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.

Class protocol:

instance creation
o  title: titleString okText1: text1 okText2: text2 abortText: abortText action1: block1 action2: block2
create and return a new EnterBox-with-2 buttons
and define its text, button-labels and actions


Instance protocol:

accessing
o  action2: aBlock
set the action to be performed when user presses the 2nd ok-button;
aBlock must be nil or a block with one argument

o  okText2: aString
set the text to be displayed in the 2nd ok-button

o  okText2: aString action2: aBlock
set the text to be displayed in the 2nd ok-button,
and its action

initialization
o  initialize
add a second ok-button (a return button)

user interaction
o  keyPress: aKey x: x y: y
return-key duplicates ok-function if acceptReturnAsOK is true

o  ok2Pressed
user pressed 2nd ok button - evaluate action



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 03:17:30 GMT