eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DialogBox':

Home

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

Class: DialogBox


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--TopView
                  |
                  +--StandardSystemView
                     |
                     +--ModalBox
                        |
                        +--DialogBox
                           |
                           +--ActionWaitBox
                           |
                           +--Dolphin::ListPrompter
                           |
                           +--Dolphin::MessageBox
                           |
                           +--Dolphin::Prompter
                           |
                           +--EnterBox
                           |
                           +--FontPanel
                           |
                           +--InfoBox
                           |
                           +--LicenceBox
                           |
                           +--OptionBox
                           |
                           +--Tools::SearchDialog

Package:
stx:libwidg
Category:
Views-DialogBoxes
Version:
rev: 1.422 date: 2018/05/23 15:31:27
user: sr
file: DialogBox.st directory: libwidg
module: stx stc-classLibrary: libwidg
Author:
Claus Gittinger

Description:


this class implements the common behavior of dialogboxes.

DialogBox is also a superclass of many other boxes - see InfoBox,
WarningBox, YesNoBox etc. for concrete examples.
Most of them simply add buttons or other elements.

For programmatically created boxes, instances support adding of components
in a top-to-bottom fashion, and also keep track of added text-fields and,
since they are most common, automatically create an EnterFieldGroup for
them.

Caveat:
    more adding support is required - especially for row-wise construction.
    The programmatic interface is best suited for row-wise
    arranged components; laying out elements in columns is a bit
    complicate - for complicated dialogs, it may be better to not use
    the automatic arrangement, but instead give explicit layouts to
    the components (in a subclass) or better use the UIPainter.

Compatibility note:
    For ST-80 compatibility, DialogBox is also accessible under
    the global named 'Dialog' (which is the name of an ST-80 class,
    providing a very similar protocol).
    This may lead to confusion, if DialogBox is recompiled - you have
    to manually assign Dialog again to refer to the new DialogBox class.
    In future versions of ST/X, DialogBox may be renamed to Dialog.

Historic note:
    originally, ST/X had separate classes for the various entry methods;
    there were YesNoBox, EnterBox, InfoBox and so on.
    ST-80 has all this defined in the common Dialog.
    Therefore, for compatibility, many ST/X methods defined here in Dialogs
    class protocol simply dispatch to some other boxes class method.
    In the future, those existing subclasses' functionality is going to
    be moved full into Dialog, and the subclasses will be replaced by dummy
    delegators. (They will be kept for backward compatibility, though).


[instance variables:]

    buttonPanel      <PanelView>    contains the button(s)

    okButton         <Button>       the ok-Button

    okAction         <Block>        the action to be performed when ok is pressed,
                                    or return is pressed.

    acceptReturnAsOK <Boolean>      if true, pressing the return-key counts
                                    as if ok was pressed. Default is true.

    abortButton      <Button>       the cancel-Button

    abortAction      <Block>        the action to be performed when cancel is
                                    pressed.

    yPosition        <Integer>      current y position when adding components

    leftIndent       <Integer>      left inset to use when adding components

    rightIndent      <Integer>      right inset to use when adding components

    addedComponents  <Collection>   programmatically added components

    inputFieldGroup  <EnterFieldGroup>
                                    for added input fields

    acceptOnLeave    <Boolean>      if true (the default) and there are
                                    tabable inputFields, accept and close when
                                    the last field is left. If false, the ok
                                    button must be pressed to close the box.

    acceptedValue    v(<Boolean>)   valueHolder on a boolean
                                    after close: holds true if box was accepted
                                    (i.e. ok-Button was pressed), false if box was
                                    closed via cancel or window manager.

    autoAccept       Boolean        if true, pressing ok (or return)
                                    sends #accept to all subcomponents.
                                    I.e. all subfields update their models
                                    first. The default is true.

    variablePanel   nil|VPanel      an optional additional panel to be filled dynamically
                                    in an aboutToOpenNotification hook.

For compatibility with ST-80, this class is also available under
the global names DialogView and Dialog (see patches file).


Related information:

    Button
    CheckToggle
    Toggle
    EditField
    SelectionInListView
    FileSelectionList
    FramedBox
    Separator
    [introduction to view programming]

Class protocol:

Compatibility-Squeak
o  chooseDirectory
self chooseDirectory

Compatibility-VW
o  choose: aString fromList: list values: listValues lines: maxLines cancel: cancelBlock for: aView
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
This is a new VW2.5 interface - passing an addtional argument.
In ST/X, this is not needed and ignored
usage example(s):
     Transcript showCR:(
	 Dialog 
	    choose:'choose any' 
	    fromList:#('one' 'two' 'three' 'four') 
	    values:#(1 2 3 4) 
	    lines:4
	    cancel:nil
     )

     Transcript showCR:(
	 Dialog 
	    choose:'choose example' 
	    fromList:#('one' 'two' 'three' 'four') 
	    values:#(1 2 3 4) 
	    lines:4
	    cancel:[Transcript flash. #aborted]
     )

o  confirm: aMessageString for: ignoredView
VW compatibility - confirm using the same viewStyle as in the view
argument; not supported in ST/X (who mixes styles ?)

o  request: aString for: aView
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or the empty string (if cancel was pressed),
This is a new VW2.5 interface - passing an addtional argument.
In ST/X, this is not needed and ignored

o  request: aString initialAnswer: initial for: aView
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string) or nil (if cancel was pressed).
This is a new VW2.5 interface - passing an addtional argument.
In ST/X, this is not needed and ignored

o  requestFileName: title default: default version: versionSym ifFail: failBlock for: aViewOrNil
new VW2.5 interface - passing an addtional argument.
In ST/X, this is not needed and ignored

o  warn: aMessageString for: ignoredView
VW compatibility - warn using the same viewStyle as in the view
argument; not supported in ST/X (who mixes styles ?)

class initialization
o  initialize
do this for ST-80 compatibility

common dialogs
o  about: text label: label icon: image
opens an standard about box for an application.

o  aboutClass: aClass
opens a standard (simple) aboutBox for aClass.
usage example(s):
     Dialog aboutClass:Dialog
     Dialog aboutClass:Dialog withText:'some more blabla'

o  aboutClass: aClass withText: textOrNil
opens a standard (simple) aboutBox for aClass.

o  ask: setupBlock ifNotNilOrEmptyDo: actionBlock
utility: open a requestor with setupBlock;
if it answers ok, invoke actionBlock with the entered input.
Otherwise do nothing
usage example(s):
     Dialog 
        ask:[ Dialog request:'Some Answer:' ] 
        ifNotNilOrEmptyDo:[:what | Transcript showCR:what ]
usage example(s):
     Dialog 
        ask:[ Dialog requestFileName:'Some File:' ] 
        ifNotNilOrEmptyDo:[:what | Transcript showCR:what ]

o  askYesNo: setupBlock ifYesDo: actionBlock
utility: open a confirmer with setupBlock;
if it answers true, invoke actionBlock.
Otherwise do nothing
usage example(s):
     Dialog 
        askYesNo:[ Dialog confirm:'Yes or No?' ] 
        ifYesDo:[ Transcript showCR:'yes' ]

o  informUser: aString during: aBlock
show a message-box while executing aBlock
usage example(s):
     Dialog informUser:'wait a second...' during:[Delay waitForSeconds:1]
     Dialog informUser:'wait a few seconds...' during:[10000 factorial]

o  informUser: aString during: aBlock cancel: canCancel
show a message-box while executing aBlock
usage example(s):
     Dialog informUser:'don''t wait ...' during:[true] cancel:true
     Dialog informUser:'please wait a second...' during:[Delay waitForSeconds:1] cancel:true
     Dialog informUser:'please wait, while I compute 30000 factorial...' during:[30000 factorial] cancel:true

o  information: aString
launch a Dialog to tell user something
usage example(s):
     Dialog information:'help'

o  information: aString title: windowTitle
launch a Dialog to tell user something
usage example(s):
     Dialog information:'help' title:'Attention'

o  informationText: aString title: windowTitle
launch a Dialog to tell user something.
The argument aString is shown as multiline, scrollable text
usage example(s):
     Dialog 
        informationText:(DialogBox class compiledMethodAt:#information:title:) source
        title:'Hello'

o  informationText: aString title: title windowTitle: windowTitle
launch a Dialog to tell user something.
The argument aString is shown as multiline, scrollable text
usage example(s):
     Dialog 
        informationText:(DialogBox class compiledMethodAt:#information:title:) source
        title:'Hello - the text is:'
        windowTitle:'Hello'

o  warn: aString
launch a Dialog to warn user
usage example(s):
     Dialog warn:'some warning message'

     Dialog warn:('some text with italic emphasis' asText 
                        emphasizeFrom:16 to:22 with:#italic)

     Dialog warn:('some warning message' asText 
                        emphasizeAllWith:(#color->Color red))

     Dialog warn:('some text with color emphasis' asText 
                        emphasizeFrom:6 to:10 with:(#color->Color blue);
                        emphasizeFrom:16 to:20 with:(#color->Color red))

o  warn: aString title: windowTitle
launch a Dialog to warn user
usage example(s):
     Dialog warn:'some warning message'

     Dialog warn:('some text with italic emphasis' asText 
                        emphasizeFrom:16 to:22 with:#italic)

     Dialog warn:('some warning message' asText 
                        emphasizeAllWith:(#color->Color red))

     Dialog warn:('some text with color emphasis' asText 
                        emphasizeFrom:6 to:10 with:(#color->Color blue);
                        emphasizeFrom:16 to:20 with:(#color->Color red))

confirmation dialogs
o  confirm: aString
open a modal yes-no dialog.
Return true for yes, false for no
usage example(s):
    Dialog confirm:'really ?' 

    Transcript showCR:(
       Dialog confirm:'are you certain ?'
    )

o  confirm: aString default: what
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
InitialAnswer must be true or false and defines which button is to be
the default (i.e. return-) button
usage example(s):
     Dialog confirm:'Are you happy' default:true 

     Dialog confirm:'Are you happy' default:false 

o  confirm: aString initialAnswer: what
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
InitialAnswer must be true or false and defines which button is to be
the default (i.e. return-) button
usage example(s):
    Dialog confirm:'really ?' initialAnswer:false

    Transcript showCR:(
       Dialog confirm:'are you certain ?' initialAnswer:false
    )

    Transcript showCR:(
       Dialog confirm:'are you certain ?' initialAnswer:true 
    )

o  confirm: aString initialAnswer: what noLabel: noText
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
InitialAnswer must be true or false and defines which button is to be
the default (i.e. return-) button

o  confirm: aString noLabel: noText
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
The no-button is labeled noText (for example, if you need a 'cancel' there)
usage example(s):
    Dialog confirm:'really ?' 

    Dialog confirm:'really ?' noLabel:'Cancel' 

o  confirm: aString title: title
open a modal yes-no dialog.
Return true for yes, false for no
usage example(s):
    Dialog confirm:'really ?' 

    Transcript showCR:(
       Dialog confirm:'are you certain ?'
    )

o  confirm: aString title: title noLabel: noText
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
The no buttons label is defined by noText (for example, to make it 'cancel').
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:'fooBar'
       noLabel:'Nope'      
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:nil
       noLabel:'Cancel'   

o  confirm: aString title: title yesLabel: yesText noLabel: noText
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
The yes/no buttons labels are defined by yesText/noText.
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:'fooBar'
       yesLabel:'Oh well' 
       noLabel:'Nope'
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:nil
       yesLabel:'Oh well' 
       noLabel:'Nope'
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:''
       yesLabel:'Oh well' 
       noLabel:'Nope'

o  confirm: aString title: title yesLabel: yesText noLabel: noText initialAnswer: what
launch a Dialog, which allows user to enter yes or no.
return true for yes, false for no.
The yes/no buttons labels are defined by yesText/noText.
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:'fooBar'
       yesLabel:'Oh well' 
       noLabel:'Nope'
       initialAnswer:true
usage example(s):
    Dialog 
       confirm:'really ?' 
       title:'fooBar'
       yesLabel:'Oh well' 
       noLabel:'Nope'
       initialAnswer:false

o  confirm: msg withCancel: aBoolean
launch a Dialog, which allows user to enter yes, no and optionally: cancel.
Return true for 'yes', false for 'no', nil for 'cancel'
usage example(s):
     Dialog confirm:'really ?' withCancel:false 
     Dialog confirm:'really ?' withCancel:true 

o  confirm: msg withCancel: aBoolean default: default
launch a Dialog, which allows user to enter yes, no and optionally: cancel.
Return true for 'yes', false for 'no', nil for 'cancel'
usage example(s):
     Dialog confirm:'really ?' withCancel:false 
     Dialog confirm:'really ?' withCancel:true 

o  confirm: aString yesLabel: yesText
launch a Dialog, which allows user to enter yes or no.
Return true for yes, false for no.
The yes button's label is defined by yesText.
usage example(s):
    Dialog 
       confirm:'really ?' 
       yesLabel:'Oh well' 

o  confirm: aString yesLabel: yesText initialAnswer: what
launch a Dialog, which allows user to enter yes or no.
Return true for yes, false for no.
The yes button's label is defined by yesText.
usage example(s):
    Dialog 
       confirm:'really ?' 
       yesLabel:'Oh well' 
       initialAnswer:false

o  confirm: aString yesLabel: yesText noLabel: noText
launch a Dialog, which allows user to enter yes or no.
Return true for yes, false for no.
The yes/no buttons' labels are defined by yesText/noText.
usage example(s):
    Dialog 
       confirm:'really ?' 
       yesLabel:'Oh well' 
       noLabel:'Nope'

o  confirm: aString yesLabel: yesText noLabel: noText initialAnswer: what
launch a Dialog, which allows user to enter yes or no.
Return true for yes, false for no.
The yes/no buttons labels are defined by yesText/noText.
usage example(s):
    Dialog 
       confirm:'really ?' 
       yesLabel:'Oh well' 
       noLabel:'Nope'
       initialAnswer:false

o  confirmOKCancel: aString
launch a Dialog, which allows user to enter OK or Cancel.
return true for OK, false for Cancel.
usage example(s):
    Dialog confirmOKCancel:'really ?' 

o  confirmWithCancel: aString
launch a Dialog, which allows user to enter yes, no and cancel.
return true for 'yes', false for 'no', nil for 'cancel'
usage example(s):
     Dialog confirmWithCancel:'really ?' 
usage example(s):
     Transcript showCR:(
        Dialog confirmWithCancel:'really ?'
     )

o  confirmWithCancel: aString default: default
launch a Dialog, which allows user to enter yes, no and cancel.
return true for 'yes', false for 'no', nil for 'cancel'.
The default argument marks the return-button; it may be one of nil, false or true
usage example(s):
     Dialog confirmWithCancel:'really ?' default:false
     Dialog confirmWithCancel:'really ?' default:true

o  confirmWithCancel: aString default: defaultValue onCancel: cancelValue
launch a Dialog, which allows user to enter yes, no and cancel.
return true for 'yes', false for 'no', cancelValues value for 'cancel'
usage example(s):
     Dialog confirmWithCancel:'really ?' onCancel:[AbortSignal raise]

o  confirmWithCancel: aString default: default title: titleString
launch a Dialog, which allows user to enter yes, no and cancel.
return true for 'yes', false for 'no', nil for 'cancel'.
The default argument marks the return-button; it may be one of nil, false or true
usage example(s):
     Dialog confirmWithCancel:'really ?' default:false
     Dialog confirmWithCancel:'really ?' default:true

o  confirmWithCancel: aString labels: labelArray
launch a Dialog, which allows user to enter cancel, no or yes.
Return true for 'yes', false for 'no', nil for 'cancel'.
The default is yes.
The buttons labels are given in labelArray, cancel being first, yes being last
(notice that the order may get reversed in some styles)
usage example(s):
     Dialog confirmWithCancel:'really ?' labels:#( 'Oops' 'Nope' 'Yea')
     Dialog confirmWithCancel:'really ?'

o  confirmWithCancel: aString labels: buttonLabels default: default
launch a Dialog, which allows user to enter yes, no and cancel.
Return true for 'yes', false for 'no', nil for 'cancel'.
The strings for cancel, no and yes are to be passed in
buttonLabels, with cancel/abort being the first.
The default argument (if non-nil) defines the index of the
return button (1 to 3)
usage example(s):
     Transcript showCR:(
         Dialog 
            confirmWithCancel:'really ?'
                       labels:#('mhmh' 'Maybe' 'Definitely')
                      default:3
     )

o  confirmWithCancel: aString labels: buttonLabels values: buttonValues default: default
launch a Dialog, which allows user to click on any button.
Return the corresponding value from the values array.
The labels for the buttons are to be passed in
buttonLabels, with cancel/abort being the first.
The default argument (if non-nil) defines the index of the
return button (1 to n)
usage example(s):
     Transcript showCR:(
         Dialog 
            confirmWithCancel:'really ?'
                       labels:#('mhmh' 'maybe' 'definitely')
                       values:#(1 2 3)
                      default:3
     )

o  confirmWithCancel: aString labels: buttonLabels values: buttonValues default: default boxLabel: boxLabelOrNil
obsolete - for backward compatibility

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  confirmWithCancel: aString labels: buttonLabels values: buttonValues default: default check: checkLabelOrNil on: checkHolderOrNil title: boxLabelOrNil
launch a Dialog, which allows user to click on any button.
Return the corresponding value from the values array.
The labels for the buttons are to be passed in
buttonLabels, with cancel/abort being the first.
The default argument (if non-nil) defines the index of the return button (1 to n).
If checkLabel/checkHolder are not nil, and additional labelled checkBox is added to operate on
checkHolder. This can be used for 'do not show this box again' checkItems.
usage example(s):
     Transcript showCR:(
         Dialog
            confirmWithCancel:'really ?'
            labels:#('mhmh' 'maybe' 'definitely')
            values:#(1 2 3)
            default:3
            check:'Again' on:(true asValue)
            title:'hello there'
     )

     Transcript showCR:(
         Dialog
            confirmWithCancel:'really ?'
            labels:#('mhmh' 'maybe' 'definitely')
            values:#(1 2 3)
            default:3
            check:nil on:nil
            title:'hello there'
     )

o  confirmWithCancel: aString labels: buttonLabels values: buttonValues default: default title: boxLabelOrNil
launch a Dialog, which allows user to click on any button.
Return the corresponding value from the values array.
The labels for the buttons are to be passed in
buttonLabels, with cancel/abort being the first.
The default argument (if non-nil) defines the index of the
return button (1 to n)
usage example(s):
     Transcript showCR:(
         Dialog
            confirmWithCancel:'really ?'
            labels:#('mhmh' 'maybe' 'definitely')
            values:#(1 2 3)
            default:3
            title:'hello there'
     )

o  confirmWithCancel: aString onCancel: cancelValue
launch a Dialog, which allows user to enter yes, no and cancel.
return true for 'yes', false for 'no', cancelValues value for 'cancel'
usage example(s):
     Dialog confirmWithCancel:'really ?' onCancel:[AbortSignal raise]

o  confirmWithCancel: aString title: titleString
launch a Dialog, which allows user to enter yes, no and cancel.
return true for 'yes', false for 'no', nil for 'cancel'
usage example(s):
     Dialog confirmWithCancel:'really ?' 
usage example(s):
     Transcript showCR:(
        Dialog confirmWithCancel:'really ?'
     )

o  confirmWithRaiseAbortOnCancel: aString
launch a Dialog, which allows user to enter yes, no and cancel.
Return true for 'yes', false for 'no'.
Raise the abort signal 'cancel'
usage example(s):
     Dialog confirmWithRaiseAbortOnCancel:'really ?' 
usage example(s):
     Transcript showCR:(
        Dialog confirmWithRaiseAbortOnCancel:'really ?'
     )

defaults
o  defaultLabel
return the boxes default window title.

o  updateStyleCache
extract values from the styleSheet and cache them in class variables

file name dialogs
o  requestDirectoryName
same as requestFileName, but only show directories.
usage example(s):
     Dialog requestDirectoryName

o  requestDirectoryName: title
same as requestFileName, but only show directories.
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' 

o  requestDirectoryName: title default: aFileName
same as requestFileName, but only show directories
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' 
        default:'/etc'

o  requestDirectoryName: title default: aFileName acceptReturnAsOK: aBoolean
same as requestFileName, but only show directories
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' 
        default:'/etc'

o  requestDirectoryName: title default: aFileName ifFail: failBlock
same as requestFileName, but only show directories
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' 
        default:'/etc'
        ifFail:'none'    'none'

o  requestDirectoryName: title default: aFileName ok: okText abort: abortText
same as requestFileName, but only show directories
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' 
        default:'/etc'
        ok:'Yes' abort:'No'    

o  requestDirectoryName: title default: aFileName ok: okText abort: abortText ifFail: failBlock
Same as requestFileName, but only show directories.

o  requestDirectoryName: title default: aFileName ok: okText abort: abortText ifFail: failBlock acceptReturnAsOK: aBoolean
Same as requestFileName, but only show directories.
Extended to accept return as ok if wanted.
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' 
        default:'/etc'
        ifFail:'none'

o  requestDirectoryName: titleString default: aFileName ok: okText abort: abortText version: versionSymbol pattern: pattern fromDirectory: aDirectoryPath ifFail: failBlock whenBoxCreatedEvaluate: boxCreatedCallback asLoadDialog: aBoolean
same as requestFileName, but only show directories

o  requestDirectoryName: titleString default: aFileName pattern: pattern fromDirectory: aDirectoryPath
same as requestFileName, but only show directories
usage example(s):
     Dialog
        requestDirectoryName:'which directory ?' default:'/etc'
        pattern:'*' fromDirectory:'/'

o  requestFileName
launch a Dialog, which allows the user to enter a filename.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog requestFileName

o  requestFileName: titleString
launch a Dialog, which allows user to enter a filename.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog requestFileName:'enter a fileName:' 
     Dialog requestFileName:'enter a fileName:' 

o  requestFileName: titleString default: defaultName
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog requestFileName:'Enter a fileName:' default:''  
     Dialog requestFileName:'Enter a fileName:' default:'Makefile.bak'  

o  requestFileName: titleString default: defaultName fromDirectory: aDirectoryPath
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:' 
        default:'Makefile.bak'
        fromDirectory:'..'      

o  requestFileName: titleString default: defaultName ifFail: cancelBlockOrValue
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog requestFileName:'enter a fileName:' default:''  
     Dialog requestFileName:'enter a fileName:' default:'Makefile.bak'  

o  requestFileName: titleString default: defaultName ifFail: failReturn pattern: pattern fromDirectory: dir
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from dir.
The box will show ok/cancel in its buttons.
The matchPattern is set to pattern initially.
Return the string or failReturn if cancel was pressed.

o  requestFileName: titleString default: defaultName ok: okText abort: abortText
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        ok:'yeah' 
        abort:'oh, no' 

o  requestFileName: titleString default: defaultName ok: okText abort: abortText pattern: pattern
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
	requestFileName:'enter a fileName:'
	default:''
	ok:'yeah' 
	abort:'oh, no' 
	pattern:'*.st'   

o  requestFileName: titleString default: defaultName ok: okText abort: abortText pattern: pattern fromDirectory: aDirectoryPathOrNil
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.

o  requestFileName: titleString default: defaultName ok: okText abort: abortText pattern: pattern fromDirectory: aDirectoryPathOrNil forSave: forSave
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.

o  requestFileName: titleString default: defaultName ok: okText abort: abortText pattern: pattern fromDirectory: aDirectoryPathOrNil forSave: forSave whenBoxCreatedEvaluate: boxCreatedCallback
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.

o  requestFileName: titleString default: defaultName ok: okText abort: abortText pattern: pattern fromDirectory: aDirectoryPathOrNil whenBoxCreatedEvaluate: boxCreatedCallback
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        ok:'yeah' 
        abort:'oh, no' 
        pattern:'rc*'
        fromDirectory:'/etc'  

o  requestFileName: titleString default: defaultName ok: okText abort: abortText pattern: patternOrNil orFilters: filtersOrNil fromDirectory: aDirectoryPathOrNil forSave: forSave whenBoxCreatedEvaluate: boxCreatedCallback
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        ok:'yeah' 
        abort:'oh, no' 
        pattern:'rc*'
        fromDirectory:'/etc'  

o  requestFileName: titleString default: defaultName ok: okText abort: abortText version: versionSymbol ifFail: failBlock pattern: pattern fromDirectory: aDirectoryPath whenBoxCreatedEvaluate: boxCreatedCallback asLoadDialog: aBoolean
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

o  requestFileName: titleString default: defaultName pattern: pattern
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show ok/cancel in its buttons.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        pattern:'*.st'   
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        pattern:'*.st;*.h'   

o  requestFileName: titleString default: defaultName pattern: pattern fromDirectory: aDirectory
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show ok/cancel in its buttons.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        pattern:'*.st'   
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        pattern:'*.st;*.h'   

o  requestFileName: titleString default: defaultName version: versionSymbol
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string or the empty string if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

usage example(s):
     Dialog requestFileName:'enter a fileName:'
			default:''
			version:nil   

     Dialog requestFileName:'enter a fileName:'
			default:''
			version:#mustBeNew 

     Dialog requestFileName:'enter a fileName:'
			default:''
			version:#new   

o  requestFileName: titleString default: defaultName version: versionSymbol ifFail: failBlock
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

usage example(s):
     Dialog 
	requestFileName:'enter a fileName:'
	default:''
	version:nil
	ifFail:['none']   
usage example(s):
     Dialog 
	requestFileName:'enter a fileName:'
	default:''
	version:#old 
	ifFail:['none']   

o  requestFileName: titleString default: defaultName version: versionSymbol ifFail: failBlock fromDirectory: aDirectoryPath
launch a Dialog, which allows user to enter a filename.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:nil
        ifFail:['none']
        fromDirectory:'/etc'
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:#old 
        ifFail:['none']   
        fromDirectory:'/etc'
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:#mustBeNew 
        ifFail:['none']   
        fromDirectory:'/etc'

o  requestFileName: titleString default: defaultName version: versionSymbol ifFail: failBlock pattern: pattern fromDirectory: aDirectoryPath
launch a Dialog, which allows user to enter a filename.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

o  requestFileName: titleString default: defaultName version: versionSymbol ifFail: failBlock pattern: pattern fromDirectory: aDirectoryPath forSave: forSave whenBoxCreatedEvaluate: boxCreatedCallback
launch a Dialog, which allows user to enter a filename.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:nil
        ifFail:['none']
        pattern:'*.conf'
        fromDirectory:'/etc'
usage example(s):
     Dialog 
        requestFileName:'Enter a fileName:'
        default:''
        version:#old 
        ifFail:['none']   
        pattern:'*.conf'
        fromDirectory:'/etc'
usage example(s):
     Dialog 
        requestFileName:'Enter a fileName:'
        default:''
        version:#mustBeNew 
        ifFail:['none']   
        pattern:'*.conf'
        fromDirectory:'/etc'

o  requestFileName: titleString default: defaultName version: versionSymbol ifFail: failBlock pattern: pattern fromDirectory: aDirectoryPath whenBoxCreatedEvaluate: boxCreatedCallback
launch a Dialog, which allows user to enter a filename.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:nil
        ifFail:['none']
        pattern:'*.conf'
        fromDirectory:'/etc'
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:#old 
        ifFail:['none']   
        pattern:'*.conf'
        fromDirectory:'/etc'
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        default:''
        version:#mustBeNew 
        ifFail:['none']   
        pattern:'*.conf'
        fromDirectory:'/etc'

o  requestFileName: titleString fromDirectory: aDirectory
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show ok/cancel in its buttons.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        fromDirectory:'../../libbasic'

o  requestFileName: titleString ifFail: cancelBlockOrValue
launch a Dialog, which allows user to enter a filename.
Return the pathname string consisting of the full pathname of the filename,
or the value from evaluating cancelBlock (if cancel was pressed).
usage example(s):
     Dialog requestFileName:'enter a fileName:' ifFail:['foo']
     Dialog requestFileName:'enter a fileName:' ifFail:[nil] 

o  requestFileName: titleString pattern: pattern
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show ok/cancel in its buttons.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        pattern:'*.st'   
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        pattern:'*.st;*.h'   

o  requestFileName: titleString pattern: pattern fromDirectory: aDirectory
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show ok/cancel in its buttons.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        pattern:'*.st'   
usage example(s):
     Dialog 
        requestFileName:'enter a fileName:'
        pattern:'*.st;*.h'   

o  requestFileNameForImageSave: title image: anImage default: defaultName pattern: patternOrNil
launch a Dialog, which allows user to enter a filename for a bitmap image save operation.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     self 
        requestFileNameForImageSave:'save' 
        image:(Image fromScreen:(0@0 corner:100@100)) 
        default:'screen.png' 
        pattern:'*.png' 

o  requestFileNameForSave: titleString
launch a Dialog, which allows user to enter a filename.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).

o  requestFileNameForSave: titleString default: defaultName
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog requestFileName:'enter a fileName:' default:''  
     Dialog requestFileNameForSave:'enter a fileName:' default:''  

o  requestFileNameForSave: titleString default: defaultName fromDirectory: aDirectoryPath
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).

o  requestFileNameForSave: titleString default: defaultName ok: okText abort: abortText pattern: pattern
launch a Dialog, which allows user to enter a filename.
The files presented initially are those from the current directory.
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string or nil if cancel was pressed.

o  requestFileNameForSave: titleString default: defaultName ok: okText abort: abortText pattern: pattern fromDirectory: aDirectoryPathOrNil
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.

o  requestFileNameForSave: titleString default: defaultName ok: okText abort: abortText pattern: pattern fromDirectory: aDirectoryPathOrNil whenBoxCreatedEvaluate: boxCreatedCallback
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return the string, or nil if cancel was pressed.

o  requestFileNameForSave: titleString default: defaultName version: versionSymbol ifFail: failBlock
launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

o  requestFileNameForSave: titleString default: defaultName version: versionSymbol ifFail: failBlock fromDirectory: aDirectoryPath
launch a Dialog, which allows user to enter a filename.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

o  requestFileNameForSave: titleString default: defaultName version: versionSymbol ifFail: failBlock pattern: pattern fromDirectory: aDirectoryPath
launch a Dialog, which allows user to enter a filename.
Return the string or the value of failBlock if cancel was pressed.
The version argument allows validation of the files existance;
it may be any of:
#mustBeNew - fail (return empty string) if the file exists
#new - confirm if the file exists
#mustBeOld - fail if the file does not exist
#old - confirm if the file does not exist
#any (other) - no validation

o  requestFileNames: titleString default: defaultName ok: okText abort: abortText ifFail: failBlock pattern: pattern fromDirectory: aDirectoryPath whenBoxCreatedEvaluate: boxCreatedCallback asLoadDialog: asLoadDialog
launch a Dialog, which allows user to enter a filename.
The files presented initially are those in aDirectoryPathOrNil, or the
last fileBox directory (default: current directory) (if a nil path is given).
The box will show okText in its okButton, abortText in the abortButton.
The matchPattern is set to pattern initially.
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed

o  requestNewFileName: titleString default: defaultName
launch a Dialog, which allows user to enter a filename.
We expect a new files (i.e. nonexisting) name to be entered,
and confirm if it already exists.
The box will not allow pressing 'ok' without an entered string.
Return the pathname string consisting of the full pathname of the filename,
or an empty string (if cancel was pressed).
usage example(s):
     Dialog requestNewFileName:'enter a fileName:' default:''

o  requestSaveFileName: title default: defaultOrNil fromDirectory: directoryOrNil action: action appendAction: appendActionOrNil
save contents into a file - ask user for filename using a fileSelectionBox.
Append is NOT offered, if appendActionOrNil is nil.
usage example(s):
     Dialog
        requestSaveFileName:'Save dialog example with append' 
        default:'xxx.txt' 
        fromDirectory:(Filename homeDirectory) 
        action:[:fn | Transcript showCR:'save ',fn] 
        appendAction:[:fn | Transcript showCR:'append ',fn]

     Dialog
        requestSaveFileName:'Save dialog example' 
        default:'xxx.txt' 
        fromDirectory:(Filename homeDirectory) 
        action:[:fn | Transcript showCR:'save ',fn] 
        appendAction:nil

fill in the blank dialogs
o  forRequestText: title editViewClass: editViewClass lines: numLines columns: numCols initialAnswer: initialText initialSelection: anIntervalOrNil model: textModel
return a dialog asking for multiline text.
The box is not shown yet, for further customization

o  forRequestText: title editViewClass: editViewClass lines: numLines columns: numCols initialAnswer: initialText model: textModel
return a dialog asking for multiline text.
The box is not shown yet, for further customization

o  forRequestText: title editViewClass: editViewClass lines: numLines columns: numCols initialAnswer: initialText setupWith: aSetupBlockOrNil
return a dialog asking for multiline text.
The box is not shown yet, for further customization

o  forRequestText: title lines: numLines columns: numCols initialAnswer: initialText initialSelection: anIntervalOrNil model: textModel
return a dialog asking for multiline text.
The box is not shown yet, for further customization

o  forRequestText: title lines: numLines columns: numCols initialAnswer: initialText model: textModel
return a dialog asking for multiline text.
The box is not shown yet, for further customization

o  request: aString
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or the empty string (if cancel was pressed)
usage example(s):
     Dialog request:'enter a string:' 

o  request: aString displayAt: aPoint centered: centered action: resultAction initialAnswer: initial
launch a Dialog, which allows user to enter a string.
If aPoint is nonNil, the box is shown there, optionally centered around
that point.
If it is nil, it is shown at the current pointer position or at the
screen center.
Return the string or an empty string (if cancel was pressed)
usage example(s):
     centered around 200@200:

         Dialog 
            request:'Enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'


     origin at 200@200:

         Dialog 
            request:'Enter a string:'
            displayAt:200@200
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'

     under mouse pointer:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'

     centered on the screen:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'

o  request: aString displayAt: aPoint centered: centered action: resultAction initialAnswer: initial okLabel: okLabel cancelLabel: cancelLabel onCancel: cancelValue
launch a Dialog, which allows user to enter a string.
If aPoint is nonNil, the box is shown there, optionally centered around it.
If it is nil, it is shown at the current pointer position or at the
screen center (if centered is true).
The ok-button is labelled okLabel (or the default, ifNil),
the cancel-button is labelled cancelLabel (or the default, ifNil).
Return the string or the value of cancelValue (if cancel was pressed)
usage example(s):
     at topLeft (centering is suppressed, to make the box fully visible)    
         Dialog 
            request:'Enter a string:'
            displayAt:0@0
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            onCancel:#foo

     centered around 200@200:

         Dialog 
            request:'Enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            onCancel:#foo

     topLeft of box at 200@200:

         Dialog 
            request:'Enter a string:'
            displayAt:200@200
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            onCancel:#foo

     under mouse pointer:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            onCancel:#foo

     centered on the screen:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            onCancel:#foo

o  request: aString displayAt: aPoint centered: centered action: resultAction initialAnswer: initial okLabel: okLabel cancelLabel: cancelLabel title: titleString onCancel: cancelValue
launch a Dialog, which allows user to enter a string.
The dialog's window is titled titleString, or the default (if nil).
If aPoint is nonNil, the box is shown there, optionally centered around it.
If it is nil, it is shown at the current pointer position or at the
screen center (if centered is true).
The ok-button is labelled okLabel (or the default, ifNil),
the cancel-button is labelled cancelLabel (or the default, ifNil).
Return the string or the value of cancelValue (if cancel was pressed)

o  request: aString displayAt: aPoint centered: centered action: resultAction initialAnswer: initial okLabel: okLabel cancelLabel: cancelLabel title: titleString onCancel: cancelValue list: listToSelectFrom
launch a Dialog, which allows user to enter a string.
The dialog's window is titled titleString, or the default (if nil).
If aPoint is nonNil, the box is shown there, optionally centered around it.
If it is nil, it is shown at the current pointer position or at the
screen center (if centered is true).
The ok-button is labelled okLabel (or the default, ifNil),
the cancel-button is labelled cancelLabel (or the default, ifNil).
Return the string or the value of cancelValue (if cancel was pressed)
usage example(s):
     centered around 200@200:

         Dialog 
            request:'enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo

     under mouse pointer:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo

     centered on the screen:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo

     with a list:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo
            list:#(foo bar baz)

o  request: aString displayAt: aPoint centered: centered action: resultAction initialAnswer: initial okLabel: okLabel cancelLabel: cancelLabel title: titleString onCancel: cancelValue list: listToSelectFrom initialSelection: anIntervalOrNil
launch a Dialog, which allows user to enter a string.
The dialog's window is titled titleString, or the default (if nil).
If aPoint is nonNil, the box is shown there, optionally centered around it.
If it is nil, it is shown at the current pointer position or at the
screen center (if centered is true).
The ok-button is labelled okLabel (or the default, ifNil),
the cancel-button is labelled cancelLabel (or the default, ifNil).
Return the string or the value of cancelValue (if cancel was pressed)
usage example(s):
     centered around 200@200:

         Dialog 
            request:'Enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            title:'foo'
            onCancel:#foo

     under mouse pointer:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            title:'foo'
            onCancel:#foo

     centered on the screen:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            title:'foo'
            onCancel:#foo

     with a list:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'Yes'
            cancelLabel:'No'
            title:'foo'
            onCancel:#foo
            list:#(foo bar baz)

o  request: aString displayAt: aPoint centered: centeredOrNil action: resultAction initialAnswer: initial okLabel: okLabel cancelLabel: cancelLabel title: titleString onCancel: cancelValue list: listToSelectFrom initialSelection: anIntervalOrNil entryCompletionBlock: entryCompletionBlock
launch a Dialog, which allows user to enter a string.
The dialog's window is titled titleString, or the default (if nil).
If aPoint is nonNil, the box is shown there, optionally centered around it.
If it is nil, it is shown at the current pointer position or at the
screen center (if centered is true).
The ok-button is labelled okLabel (or the default, ifNil),
the cancel-button is labelled cancelLabel (or the default, ifNil).
Return the string or the value of cancelValue (if cancel was pressed)
usage example(s):
     centered around 200@200:

         Dialog 
            request:'Enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo

     under mouse pointer:

         Dialog 
            request:'Enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo

     centered on the screen:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo

     with a list:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            okLabel:'yes'
            cancelLabel:'no'
            title:'foo'
            onCancel:#foo
            list:#(foo bar baz)

o  request: aString displayAt: aPoint centered: centered action: resultAction initialAnswer: initial onCancel: cancelValue
launch a Dialog, which allows user to enter a string.
If aPoint is nonNil, the box is shown there, optionally centered.
If it is nil, it is shown at the current pointer position or at the screen center.
Return the string or the value of cancelValue (if cancel was pressed)
usage example(s):
     at topLeft (centering is suppressed, to make the box fully visible)    
         Dialog 
            request:'enter a string:'
            displayAt:0@0
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     centered around 200@200:

         Dialog 
            request:'enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     topLeft of box at 200@200:

         Dialog 
            request:'enter a string:'
            displayAt:200@200
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     under mouse pointer:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     centered on the screen:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

o  request: aString displayAt: aPoint initialAnswer: initial
launch a Dialog, which allows user to enter something.
The boxes topLeft is placed at aPoint, or under the mouse pointer (if aPoint is nil).
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'enter a string:' 
         displayAt:(250 @ 250) 
         initialAnswer:'the default' 

o  request: aString initialAnswer: initial
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'enter a string:' 
         initialAnswer:'the default'  

o  request: aString initialAnswer: initial entryCompletionBlock: entryCompletionBlock
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'enter a selector:' 
         initialAnswer:'at:p'
         entryCompletionBlock:[:s | |completion|

                                completion := Smalltalk selectorCompletion:s.
                                completion second size > 1 ifTrue:[ Screen current beep].
                                completion first
                              ].  

o  request: aString initialAnswer: initial initialSelection: anIntervalOrNil
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'enter a string:' 
         initialAnswer:'the default'
         initialSelection:(1 to:3)

o  request: aString initialAnswer: initial list: aList
launch a Dialog, which allows user to enter something,
or select from a list of values.
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a string:' 
         initialAnswer:'the default'  
         list:#('foo' 'bar' 'baz')  
usage example(s):
     Dialog 
         request:'enter a string:' 
         initialAnswer:'the default'  
         list:((1 to:30) collect:[:i | i printString])  

o  request: aString initialAnswer: initial list: aList entryCompletionBlock: entryCompletionBlock
launch a Dialog, which allows user to enter something,
or select from a list of values.
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a string:' 
         initialAnswer:'the default'  
         list:#('foo' 'bar' 'baz')  
usage example(s):
     Dialog 
         request:'enter a string:' 
         initialAnswer:'the default'  
         list:((1 to:30) collect:[:i | i printString])  

o  request: aString initialAnswer: initial okLabel: okLabel title: titleString
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a string:' 
         initialAnswer:'the default'  
         okLabel:'Yes'      
         title:'Only a Test'      

o  request: aString initialAnswer: initial okLabel: okLabel title: titleString list: list
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter or select a string:' 
         initialAnswer:'the default'  
         okLabel:'Yes'      
         title:'Only a Test'      
         list:#('a' 'b' 'c')      

o  request: aString initialAnswer: initial okLabel: okLabel title: titleString onCancel: cancelAction
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a string:' 
         initialAnswer:'the default'  
         onCancel:['foooo']      

o  request: aString initialAnswer: initial okLabel: okLabel title: titleString onCancel: cancelAction list: listOfChoices
launch a Dialog, which allows user to enter something
(with a list of choices for fast input).
Return the entered string (may be empty string)
or cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a String:' 
         initialAnswer:'the default'
         okLabel:'OK'
         title:'demo'
         onCancel:nil
         list:#('foo' 'bar' 'baz')

o  request: aString initialAnswer: initial okLabel: okLabel title: titleString onCancel: cancelAction list: listOfChoices entryCompletionBlock: entryCompletionBlock
launch a Dialog, which allows user to enter something
(with a list of choices for fast input).
Return the entered string (may be empty string)
or cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a String:' 
         initialAnswer:'the default'
         okLabel:'OK'
         title:'demo'
         onCancel:nil
         list:#('foo' 'bar' 'baz')

o  request: aString initialAnswer: initial onCancel: cancelAction
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
         request:'enter a string:' 
         initialAnswer:'the default'  
         onCancel:['foooo']      

o  request: aString list: listOfChoices
launch a Dialog, which allows user to enter something,
but adds a list of choices for fast input.
Return the entered string (may be empty string)
or the empty string (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a string:'
         list:#('foo' 'bar' 'baz')

o  request: aString list: listOfChoices initialAnswer: initialAnswer
launch a Dialog, which allows user to enter something,
but adds a list of choices for fast input.
Return the entered string (may be empty string)
or the empty string (if cancel was pressed)
usage example(s):
     Dialog 
         request:'Enter a string:'
         list:#('foo' 'bar' 'baz')
         initialAnswer:'foe'   

o  request: aString okLabel: okLabel
launch a Dialog, which allows user to enter something.
The okButton is labelled as okLabel.
Return the entered string (may be empty string)
or the empty string (if cancel was pressed)
usage example(s):
     Dialog 
        request:'Enter a string:'
        okLabel:'Yes'

o  request: aString okLabel: okLabel onCancel: cancelValue
launch a Dialog, which allows user to enter something.
The okButton is labelled as okLabel.
Return the entered string (may be empty string)
or the value from evaluating cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
        request:'Enter a string:'
        okLabel:'Yes'
        onCancel:nil    

o  request: aString okLabel: okLabel title: titleString onCancel: cancelValue
launch a Dialog, which allows user to enter something.
The okButton is labelled as okLabel.
Return the entered string (may be empty string)
or the value from evaluating cancelValue (if cancel was pressed)
usage example(s):
     Dialog 
        request:'Enter a String:'
        okLabel:'Yes'
        title:'foo'
        onCancel:nil    

o  request: aString onCancel: cancelActionOrValue
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string)
or the value of cancelAction (if cancel was pressed).
usage example(s):
     Dialog 
         request:'Enter a String:'
         onCancel:nil       

o  request: aString title: windowTitle
launch a Dialog, which allows user to enter a string.
usage example(s):
     at topLeft (centering is suppressed, to make the box fully visible)    
         Dialog 
            request:'enter a string:'
            displayAt:0@0
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     centered around 200@200:

         Dialog 
            request:'enter a string:'
            displayAt:200@200
            centered:true
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     topLeft of box at 200@200:

         Dialog 
            request:'enter a string:'
            displayAt:200@200
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     under mouse pointer:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:false 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

     centered on the screen:

         Dialog 
            request:'enter a string:'
            displayAt:nil
            centered:true 
            action:[:result | result printNewline]
            initialAnswer:'the default'
            onCancel:#foo

o  request: aString title: titleString initialAnswer: initial
launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string) or nil (if cancel was pressed)
usage example(s):
     Dialog 
         request:'enter a string:' 
         initialAnswer:'the default'  

o  requestNumber: aString
launch a Dialog, which allows user to enter a number.
Return the numeric value or nil
(for an invalid number or if cancel was pressed)
usage example(s):
     Dialog requestNumber:'Enter your Age:'      

o  requestNumber: aString initialAnswer: aNumber
launch a Dialog, which allows user to enter a number.
Return the numeric value or nil
(for an invalid number or if cancel was pressed)
usage example(s):
     Dialog requestNumber:'Enter your Age:' initialAnswer: 25     

o  requestPassword: aString
launch a Dialog, which allows user to enter something invisibly.
Return the entered string (may be empty string)
or nil (if cancel was pressed)
usage example(s):
     Dialog 
         requestPassword:'Enter Secret:'

o  requestPassword: aString initialAnswer: defaultAnswer
launch a Dialog, which allows user to enter something invisibly.
Return the entered string (may be empty string)
or nil (if cancel was pressed)
usage example(s):
     Dialog 
         requestPassword:'Enter Secret:'
         initialText:'blabla'

o  requestText: title
open a dialog asking for multiline text.
Return a stringCollection or nil if canceled.
usage example(s):
     Dialog requestText:'Bla'

o  requestText: title initialAnswer: initialAnswer
open a dialog asking for multiline text.
Return a stringCollection or nil if canceled.
usage example(s):
     Dialog requestText:'Bla' initialAnswer:'Hello world'

o  requestText: title initialAnswer: initialAnswer initialSelection: anIntervalOrNil
open a dialog asking for multiline text.
Return a stringCollection or nil if canceled.
usage example(s):
     Dialog requestText:'Bla' initialAnswer:'Hello world' initialSelection:(1 to:5)

o  requestText: title lines: numLines columns: numCols initialAnswer: initialText
open a dialog asking for multiline text.
Return a stringCollection or nil if canceled.
usage example(s):
     Dialog requestText:'Bla' lines:8 columns:40 initialAnswer:'hello world'

o  requestText: title lines: numLines columns: numCols initialAnswer: initialText initialSelection: anIntervalOrNil
open a dialog asking for multiline text.
Return a stringCollection or nil if canceled.
usage example(s):
     Dialog 
        requestText:'Bla' lines:8 columns:40 initialAnswer:'hello world'

     Dialog 
        requestText:'Bla2' lines:8 columns:40 initialAnswer:'hello world' initialSelection:(1 to:5)

multiple choice dialogs
o  choose: aString fromList: list lines: maxLines
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the value
from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
     )

o  choose: aString fromList: list lines: maxLines initialSelection: initialSelection
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the value
from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
            initialSelection:4
     )

o  choose: aString fromList: list lines: maxLines initialSelection: initialSelection title: windowTitle
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the value
from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
            title:'Choose'    
     )

o  choose: aString fromList: list lines: maxLines title: windowTitle
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the value
from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
            title:'Choose'    
     )

o  choose: aString fromList: list values: listValues buttons: buttonLabels values: buttonValues lines: maxLines cancel: cancelBlock
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:#('five' 'six' 'seven')
                values:#(5 6 7)
                lines:10 
                cancel:nil
         )


     no buttons:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:nil
                values:nil
                lines:4
                cancel:nil
         )


     no list (lines argument is ignored):

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:nil
                values:nil
                buttons:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                lines:nil
                cancel:nil
         )


      full including cancel value:

         Transcript showCR:(
             Dialog 
                choose:'choose example' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:#('five' 'six' 'seven')
                values:#(5 6 7)
                lines:4
                cancel:[Transcript flash. #aborted]
         )


     degenerated:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:nil
                values:nil
                buttons:nil
                values:nil
                lines:nil 
                cancel:nil
         )

o  choose: aString fromList: list values: listValues buttons: buttonLabels values: buttonValues lines: maxLines cancel: cancelBlock multiple: multiple
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
If a list is present, multiple controls if multiple selections are allowed.
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns nil or an empty collection (if multiple is true).

o  choose: aString fromList: list values: listValues buttons: buttonLabels values: buttonValues lines: maxLines cancel: cancelBlock multiple: multiple postBuildBlock: aBlockOrNil
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
If a list is present, multiple controls if multiple selections are allowed.
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns nil or an empty collection (if multiple is true).
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:#('five' 'six' 'seven')
                values:#(5 6 7)
                lines:10 
                cancel:nil
                multiple:true
         )


     no buttons:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:nil
                values:nil
                lines:4
                cancel:nil
                multiple:true
         )

o  choose: aString fromList: list values: listValues buttons: buttonLabels values: buttonValues lines: maxLines cancel: cancelBlock postBuildBlock: postBuildBlock
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:#('five' 'six' 'seven')
                values:#(5 6 7)
                lines:10 
                cancel:nil
         )


     no buttons:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:nil
                values:nil
                lines:4
                cancel:nil
         )


     no list (lines argument is ignored):

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:nil
                values:nil
                buttons:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                lines:nil
                cancel:nil
         )


      full including cancel value:

         Transcript showCR:(
             Dialog 
                choose:'choose example' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:#('five' 'six' 'seven')
                values:#(5 6 7)
                lines:4
                cancel:[Transcript flash. #aborted]
         )


     degenerated:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:nil
                values:nil
                buttons:nil
                values:nil
                lines:nil 
                cancel:nil
         )

o  choose: aString fromList: list values: listValues initialSelection: initialListSelectionOrNil buttons: buttonLabels values: buttonValues default: defaultValue lines: maxLines cancel: cancelBlock multiple: multiple postBuildBlock: aBlockOrNil
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
If a list is present, multiple controls if multiple selections are allowed.
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns nil or an empty collection (if multiple is true).

o  choose: aString fromList: list values: listValues initialSelection: initialListSelectionOrNil buttons: buttonLabels values: buttonValues default: defaultValue lines: maxLines cancel: cancelBlock multiple: multiple title: windowTitle postBuildBlock: aBlockOrNil
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
If a list is present, multiple controls if multiple selections are allowed.
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns nil or an empty collection (if multiple is true).
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') values:#(1 2 3 4) 
                initialSelection: nil
                buttons:#('five' 'six' 'seven') values:#(5 6 7)
                default:6
                lines:10 
                cancel:nil
                multiple:true
                postBuildBlock:nil
         )


     no buttons:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:nil
                values:nil
                lines:4
                cancel:nil
                multiple:true
         )

o  choose: aString fromList: list values: listValues initialSelection: initialListSelectionOrNil buttons: buttonLabels values: buttonValues default: defaultValue lines: maxLines width: boxWidthOrNil cancel: cancelBlock multiple: multiple title: windowTitle postBuildBlock: aBlockOrNil
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
If a list is present, multiple controls if multiple selections are allowed.
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
The buttonValue may be a block of up to 3 arguments; it gets the selection, the box and selIndices as args.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns nil or an empty collection (if multiple is true).
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') values:#(1 2 3 4) 
                initialSelection: nil
                buttons:#('five' 'six' 'seven') values:#(5 6 7)
                default:6
                lines:10 
                cancel:nil
                multiple:true
                postBuildBlock:nil
         )


     no buttons:

         Transcript showCR:(
             Dialog 
                choose:'choose any' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:nil
                values:nil
                lines:4
                cancel:nil
                multiple:true
         )

o  choose: aString fromList: list values: listValues initialSelection: initialListSelectionOrNil buttons: buttonLabels values: buttonValues lines: maxLines cancel: cancelBlock multiple: multiple postBuildBlock: aBlockOrNil
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
If a list is present, multiple controls if multiple selections are allowed.
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns nil or an empty collection (if multiple is true).

o  choose: aString fromList: list values: listValues lines: maxLines
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#('one' 'two' 'three') 
            values:#(1 2 3) 
            lines:4
     )

o  choose: aString fromList: list values: listValues lines: maxLines cancel: cancelBlock
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#('one' 'two' 'three' 'four') 
            values:#(1 2 3 4) 
            lines:4
            cancel:nil
     )

     Transcript showCR:(
         Dialog 
            choose:'choose example' 
            fromList:#('one' 'two' 'three' 'four') 
            values:#(1 2 3 4) 
            lines:4
            cancel:[Transcript flash. #aborted]
     )

o  choose: aString fromList: list values: values lines: maxLines cancel: cancelBlock title: windowTitle
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
            title:'Choose'    
     )

o  choose: aString fromList: list values: values lines: maxLines initialSelection: initialSelection title: windowTitle
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
            title:'Choose'    
     )

o  choose: aString fromList: list values: values lines: maxLines title: windowTitle
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel.
usage example(s):
     Transcript showCR:(
         Dialog 
            choose:'choose any' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
            title:'Choose'    
     )

o  choose: aString label: windowLabel image: imageOrNil labels: buttonLabels values: values default: default onCancel: cancelValue
launch a Dialog, which allows user to enter any of buttonLabels.
Returning a corresponding value from the values-array.
The default entries button is marked as a return button and entering
return will choose that value; hitting escape returns cancelValue.
For a good userInterface style, we recommend this being the last
entry (to make the right-most button the default button).
usage example(s):
no good style (default button is not the rightmost one)

     Dialog 
        choose:'choose any' 
        label:'Foo Bar Baz'
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:2     
        onCancel:1      

     Dialog 
        choose:'choose any' 
        labels:#('cancel' 'foo' 'bar' 'baz') 
        values:#(nil foo bar baz) 
        default:#baz     

      Dialog 
        choose:'choose any' 
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:nil 

o  choose: aString label: windowLabel labels: buttonLabels values: values default: default
launch a Dialog, which allows user to enter any of buttonLabels.
Returning a corresponding value from the values-array.
The default entries button is marked as a return button and entering
return will choose that value; hitting escape returns nil.
For a good userInterface style, we recommend this being the last
entry (to make the right-most button the default button).
usage example(s):
no good style (default button is not the rightmost one)

     Dialog 
        choose:'choose any' 
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:2     

     Dialog 
        choose:'choose any' 
        labels:#('cancel' 'foo' 'bar' 'baz') 
        values:#(nil foo bar baz) 
        default:#baz     

      Dialog 
        choose:'choose any' 
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:nil 

o  choose: aString label: windowLabel labels: buttonLabels values: values default: default onCancel: cancelValue
launch a Dialog, which allows user to enter any of buttonLabels.
Returning a corresponding value from the values-array.
The default entries button is marked as a return button and entering
return will choose that value; hitting escape returns cancelValue.
For a good userInterface style, we recommend this being the last
entry (to make the right-most button the default button).
usage example(s):
no good style (default button is not the rightmost one)

     Dialog 
        choose:'choose any' 
        label:'Foo Bar Baz'
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:2     
        onCancel:1      

     Dialog 
        choose:'choose any' 
        labels:#('cancel' 'foo' 'bar' 'baz') 
        values:#(nil foo bar baz) 
        default:#baz     

      Dialog 
        choose:'choose any' 
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:nil 

o  choose: aString labels: buttonLabels values: values default: default
launch a Dialog, which allows user to enter any of buttonLabels.
Returning a corresponding value from the values-array.
The default entries button is marked as a return button and entering
return will choose that value.
For a good userInterface style, we recommend this being the last
entry (to make the right-most button the default button).
usage example(s):
no good style (default button is not the rightmost one)

     Dialog 
        choose:'choose any' 
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:2 

     Dialog 
        choose:'choose any' 
        labels:#('cancel' 'foo' 'bar' 'baz') 
        values:#(nil foo bar baz) 
        default:#baz     

      Dialog 
        choose:'choose any' 
        labels:#('one' 'two' 'three' 'four') 
        values:#(1 2 3 4) 
        default:nil 

o  chooseMultiple: aString fromList: list lines: maxLines
launch a Dialog showing the message and list.
The user can select any combination of items and click ok;
in this case, the values from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns an empty collection.
usage example(s):
     Transcript showCR:(
         Dialog 
            chooseMultiple:'choose any combination' 
            fromList:#(1 2 3 4 5 6 7) 
            lines:4
     )

o  chooseMultiple: aString fromList: list values: listValues buttons: buttonLabels values: buttonValues lines: maxLines cancel: cancelBlock
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns an empty collection.
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                chooseMultiple:'choose selected' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:nil
                values:nil
                lines:10 
                cancel:nil
         )

         Transcript showCR:(
             Dialog 
                chooseMultiple:'choose selected' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                buttons:#()
                values:#()
                lines:10 
                cancel:nil
         )

o  chooseMultiple: aString fromList: list values: listValues initialSelection: initialListSelectionOrNil lines: maxLines
launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
from listValues is returned (doubleclick works as well).
The list may be suppressed (if the list arg is nil).
Below the list, an optional row of buttons is shown, which can also be
clicked upon, and a corresponding value from buttonValues is returned.
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection returns an empty collection.
usage example(s):
     full example:

         Transcript showCR:(
             Dialog 
                chooseMultiple:'choose selected' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#(1 2 3 4) 
                initialSelection:#(2 4)
                lines:10 
         )

         Transcript showCR:(
             Dialog 
                chooseMultiple:'choose selected' 
                fromList:#('one' 'two' 'three' 'four') 
                values:#('one' 'two' 'three' 'four') 
                initialSelection:#( 'two' 'three')
                lines:10 
         )

on the fly modifications
o  modifyingBoxWith: modifyBlock do: openingBlock
perform openingBlock (which usually creates a standard dialog box),
but call modifyBlock right before the dialog is actually opened.
This allows modifyBlock to add additional controls to the dialog.
ModifyBlock is called with the box as argument.
usage example(s):
     DialogBox 
        modifyingBoxWith:[:box |
            box allViewBackground:Color red.
        ] do:[
            Dialog information:'hello'
        ].

o  withCheckBoxFor: checkModel labelled: checkLabel do: boxOpeningBlock
launch a Dialog to warn or request something.
Add a checkbox on a value holder.

o  withOptoutHolder: aValueHolder labelled: labelString do: boxOpeningBlock
launch a Dialog to warn user.
Add a 'do not show this dialog again'-like checkbox,
and change aValueHolder if the checkbox was checked.

o  withOptoutOption: optOutAction1 labelled: labelString1 andOptoutOption: optOutAction2 labelled: labelString2 do: boxOpeningBlock
launch a Dialog to warn user.
Add two 'do not show this dialog again'-like checkboxes,
and call optOutActionX after the dialog, if the checkbox was indeed checked.
usage example(s):
     Dialog 
        withOptoutOption:[Transcript flash] labelled:'opt out1' 
        andOptoutOption:[Transcript show:'wow'] labelled:'opt out2' 
        do:[ Dialog confirm:'some question' ].

o  withOptoutOption: optOutAction labelled: labelString do: boxOpeningBlock
launch a Dialog to warn user.
Add a 'do not show this dialog again'-like checkbox,
and call optOutAction after the dialog, if the checkbox was indeed checked.
usage example(s):
     Dialog 
        withOptoutOption:[Transcript flash] 
        labelled:'opt out' 
        do:[ Dialog confirm:'some question' ].

o  withOptoutOption: optOutAction labelled: labelString warn: warnString
launch a Dialog to warn user.
Add a 'do not show this dialog again'-like checkbox,
and call optOutAction after the warning, if the checkbox was indeed checked.
usage example(s):
     Dialog 
        withOptoutOption:[Transcript flash] 
        labelled:'opt out' 
        warn:'some warning'.

private
o  showAndThenDestroyBox: aBox

o  showBox: aBox

queries
o  defaultOKButtonAtLeft
somewhat of a kludge:
some viewStyles have ok at left (motif), others at right...
usage example(s):
     DialogBox defaultOKButtonAtLeft

o  defaultParentWindow
return a default parent (top-) window for the dialog.
Here, the currently active view is returned, if there
is one; otherwise, the first encountered topView is
returned.
usage example(s):
     self defaultParentWindow

o  patternForFilters: filtersOrNil
argument #filtersOrNil is window specific,
it is an array of arrays with filter (*.zip) and its description (ZIP compressed archive file)
to support a call with just #filtersOrNil and no #patternOrNil the pattern will be extracted from the #filtersOrNil for linux

which is done here

smalltalk dialogs
o  imageSaveDialog: title image: image default: defaultFileName pattern: pattern
a complete bitmap image save dialog.
Offers edit and save as button options.
Returns the fileName if saved, nil if not
usage example(s):
     Dialog
        imageSaveDialog:'save screen image' 
        image:(Image fromScreen:(0@0 corner:100@100)) 
        default:'screen.png' 
        pattern:'*.png;*.gif;*.bmp'

o  requestClass: aString
launch a Dialog, which allows user to enter an existing classes name.
Return the entered class or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClass:'Enter a class:'

o  requestClass: aString initialAnswer: initialAnswer
launch a Dialog, which allows user to enter an existing classes name.
Return the entered class or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClass:'Enter a class:'
         initialAnswer:'Array'

o  requestClass: aString list: list okLabel: okLabel initialAnswer: initial
launch a Dialog, which allows user to enter an existing classes name.
Return the entered class or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClass:'Enter a class:'
         list:(View withAllSubclasses copy sortBySelector:#name)
         okLabel:'OK'
         initialAnswer:'Arr'        

o  requestClass: aString okLabel: okLabel initialAnswer: initial
launch a Dialog, which allows user to enter an existing class's name.
Return the entered class or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClass:'Enter a class:'
         okLabel:'OK'
         initialAnswer:'Arr'        

o  requestClassName: aString initialAnswer: initial
launch a Dialog, which allows user to enter a class name.
Return the entered string (may be empty string) or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClassName:'enter a class:'
         initialAnswer:'Arr'        

o  requestClassName: aString list: list okLabel: okLabel initialAnswer: initial
launch a Dialog, which allows user to enter a class name.
Return the entered string (may be empty string) or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClassName:'Enter a class:'
         list:(Array with:Array with:String with:Point)
         okLabel:'OK'
         initialAnswer:'Arr'        

o  requestClassName: aString okLabel: okLabel initialAnswer: initial
launch a Dialog, which allows user to enter a class name.
Return the entered string (may be empty string) or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB.
usage example(s):
     Dialog 
         requestClassName:'enter a class:'
         okLabel:'OK'
         initialAnswer:'Arr'        

o  requestName: title fromList: nameList title: boxTitle initialAnswer: initialTextOrNil
Ask for a name from a list (used for namespaces and sharedPools)
usage example(s):
     Dialog 
        requestName:'Select a Name' 
        fromList:#('foo' 'bar' 'baz') 
        title:'blabla'
        initialAnswer:nil

o  requestNameSpace: title initialAnswer: initialTextOrNil
Ask for a namespaces name
usage example(s):
     Dialog 
        requestNameSpace:'Select a NameSpace' 
        initialAnswer:nil

o  requestNameSpace: title title: boxTitle initialAnswer: initialTextOrNil
Ask for a namespaces name
usage example(s):
     Dialog 
        requestNameSpace:'Select a NameSpace' 
        initialAnswer:nil

o  requestProject: title from: listOfProjectsIn initialAnswer: initialTextOrNil suggestions: suggestionsOrNil
Ask for a project (package-id)
usage example(s):
     Dialog 
        requestProject:'enter a project'
        initialAnswer:'stx:libbasic' 
        suggestions:#('foo' 'bar' 'baz')

o  requestProject: title initialAnswer: initialTextOrNil suggestions: suggestions
Ask for a project (package-id)

o  requestSelector: aString initialAnswer: initial
launch a Dialog, which allows user to enter a method selector.
Return the entered string (may be empty string) or nil (if cancel was pressed).
The entryField does selectorCompletion on TAB.
usage example(s):
     Dialog 
         requestSelector:'enter a selector:' 
         initialAnswer:'at:p'        

o  requestSelector: aString okLabel: okLabel initialAnswer: initial
launch a Dialog, which allows user to enter a method selector.
Return the entered string (may be empty string) or nil (if cancel was pressed).
The entryField does selectorCompletion on TAB.
usage example(s):
     Dialog 
         requestSelector:'enter a selector:' 
         initialAnswer:'at:p'        

o  requestSharedPool: title title: boxTitle initialAnswer: initialTextOrNil
Ask for a sharedPools name
usage example(s):
     Dialog 
        requestSharedPool:'Select a SharedPool' 
        title:nil
        initialAnswer:nil


Instance protocol:

accessing-behavior
o  abortAction: aBlock
define the action to be performed when abort is pressed

o  acceptCheck: aBlock
if nonNil, the acceptCheck-block is evaluated when the dialog is
accepted (ok-button or Return-key). If it returns true, the box is closed,
otherwise not. Of course, you may also use a valueHolder instead of a block
to provide the check value.

o  acceptOnLeave: aBoolean
define the behavior when the last input field is left via cursor keys.
The default is to accept & close the dialog (i.e. true).

o  acceptReturnAsOK: aBoolean
turn on/off interpretation of return-key as ok.
Default is on

o  action: aBlock
set the action to be performed when user presses ok-button;
aBlock must be nil or a block. This method simply
reuses okAction: and has been added for a consistent action-setting
protocol.

o  focusOnField: anInputField
arrange for the argument to get the focus (initially)

o  focusToOKOnLeave: aBoolean
define the behavior when the last input field is left via a return
or cursor key.
The default is to shift the focus to the OK button (i.e. true).
If turned off, the OK is immediately performed, i.e.
the dialog is accepted & closed.

o  hideOnAccept: aBoolean
control if the dialog should close when accepted.
The default is true

o  makeTabable: aComponentOrSubcomponent
add a component (usually a subcomponent, of which the dialog
does not know) to the list of tabable ones (i.e. those, that can be
stepped through via FocusNext/FocusPrevious).
Toplevel tabable components are usually added with #addComponent:tabable:

o  makeTabable: aComponentOrSubcomponent after: anotherComponent
add a component (usually a subcomponent, of which the dialog
does not know) to the list of tabable ones (i.e. those, that can be
stepped through via FocusNext/FocusPrevious).
Toplevel tabable components are usually added with #addComponent:tabable:

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  makeUntabable: aComponentOrSubcomponent
(tabableElements includesIdentical:aComponentOrSubcomponent) ifFalse:[

o  noAction: aBlock
define the action to be performed when 'no' is pressed

o  okAction: aBlock
define the action to be performed when ok is pressed

o  title: aString yesAction: yesBlock noAction: noBlock
define title and actions

o  yesAction: aBlock
define the action to be performed when 'yes' is pressed

o  yesAction: yesBlock noAction: noBlock
define both actions

accessing-channels
o  acceptChannel
same as #accept: return the valueHolder which is set to true when the box
is accepted

o  acceptChannel: aValueHolder
set the valueHolder which is set to true when the box
is accepted

accessing-components
o  abortButton
return the abortButton - this access is provided to allow
setting the buttons look (for example: colors or font)

o  buttonPanel
return the buttonPanel - this access is provided to allow
setting the buttons look (for example: colors or font)

o  cancelButton
same as #abortButton;
return the abortButton - this access is provided to allow
setting the buttons look (for example: colors or font)

o  noButton
return the no-button

o  okButton
return the okButton - this access is provided to allow
setting the buttons look (for example: colors or font)

o  verticalPanel
if there is none yet, create and add a vertical panel.
This can be used to add additional components in an aboutToOpen hook callback.
usage example(s):
verticalPanel height:25.

o  yesButton
return the 'yes'-button

accessing-elements
o  componentAt: name
retrieve a component by name - to access it, it must have been
named previously with #name:as:

o  name: element as: name
assign a name to a component. This can be done during construction,
to allow later access to the components (i.e. without a need to
remember them in some instVars)

accessing-look
o  abortText: aString
define the label in the abort-button

o  hideButtons
hides the buttonPanel (i.e. the ok and cancel buttons if any)

o  noLabel: aString
define the label of the 'no'-button.
And alias for #noText: - for backward compatibility

o  noText: aString
define the label of the no-button.
If not set, it defaults to the resource-string for 'no'.

o  okText: aString
define the text in the ok-button

o  okText: okString abortText: abortString
set both texts displayed in the buttons

o  okText: yesString noText: noString
define the labels of both buttons.
Alias for yesText:noText: for backward compatibility.

o  title: aString
define title
usage example(s):
     DialogBox new open
     (DialogBox new title:'Foo') open

o  title: aString yesText: yesString noText: noString
define title and button labels

o  yesLabel: aString
define the label of the 'yes'-button.
An alias for #yesText: for backward compatibility.

o  yesText: aString
define the label of the 'yes'-button

o  yesText: yesString noText: noString
define the labels of both buttons

accessing-models
o  accept
return the valueHolder holding true when the box
is accepted, false if closed via the windowManager or
the cancel button.
This is confusing: this method was originally called #acceptValue,
but renamed for compatibility with ST-80.
This looks like a bad name to me, since in most other situations, #accept
is used to force an accept, not to return some valueHolder ...).

o  aspectAt: anAspectSymbol put: aDataModel
return the dataModel for some aspect, nil if no such dataModel was defined;
requires that a corresponding dataModel has been set (usually during
initialization) via the #aspectAt:put: message.
Allows users of boxes to access individual values - especially useful,
in multi-field dialogs.

o  aspectFor: anAspectSymbol
return the dataModel for some aspect, nil if no such dataModel was defined;
requires that a corresponding dataModel has been set (usually during
initialization) via the #aspectAt:put: message.
Allows users of boxes to access individual values - especially useful,
in multi-field dialogs.

o  cancel

construction-adding
o  addComponent: aComponent
add any component with its preferred height and full width.
Returns the component.

o  addComponent: aComponent indent: indent
add any component with its preferred height and full width.
The indent is temporarily changed to indent.
Returns the component.

o  addComponent: aComponent indent: indent tabable: tabable
add any component with its preferred height and full width.
The indent is temporarily changed to indent.
Returns the component.

o  addComponent: aComponent indent: indent withExtent: ext
add any component with some given extent.
Returns the component.

o  addComponent: aComponent indent: indent withHeight: height
add any component with some given height and full width.
Returns the component.

o  addComponent: aComponent tabable: tabable
add any component with its preferred height and full width.
Returns the component.

o  addComponent: aComponent tabable: tabable tabbedComponent: subComponent
add any component with its preferred height and full width.
Returns the component.

o  addComponent: aComponent withExtent: ext
add any component with some given extent.
Returns the component.

o  addComponent: aComponent withHeight: height
add any component with some given height and full width.
Returns the component.

o  addLabelledField: aView label: labelString adjust: labelAdjust tabable: tabable from: leftX to: rightX separateAtX: relativeX
add a label and some view side-by-side.
The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0.
The label's string is defined by labelString and adjusted according to labelAdjust.
The inputField gets model as its model.
Return the inputField.

o  addLabelledField: aView label: labelString adjust: labelAdjust tabable: tabable from: leftX to: rightX separateAtX: relativeX nameAs: aName
add a label and some view side-by-side.
The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0.
The label's string is defined by labelString and adjusted according to labelAdjust.
The inputField gets model as its model.
Return the inputField.

o  addLabelledField: aView label: labelString adjust: labelAdjust tabable: tabable from: leftX to: rightX separateAtX: relativeX nameAs: aName foregroundColor: fgColor
add a label and some view side-by-side.
The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0.
The label's string is defined by labelString and adjusted according to labelAdjust.
The inputField gets model as its model.
Return the inputField.

o  addLabelledField: aView label: labelString adjust: labelAdjust tabable: tabable separateAtX: relativeX
add a label and some view side-by-side.
The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0.
The label's string is defined by labelString and adjusted according to labelAdjust.
The inputField gets model as its model.
Return the inputField.

o  addMessage: labelString centered: centered

o  addMessage: labelString textLine: valueHolder boundary: fraction

o  addMessage: labelString textLine: valueHolder type: typeSymbolOrNil boundary: fraction

o  addTextLabel: aString
create a text label - the name has been choosen for ST-80 compatibility;
however, ST/X labels allow image labels too.
Returns the label.

o  addTextLabel: aString adjust: how
create a text label - the name has been choosen for ST-80 compatibility;
however, ST/X labels allow image labels too.
Returns the label.
The adjust argument must be one of #left, #right or #center (see Label for details)

o  addTextLabelOn: aValueHolder
create a text label showing the contents of a valueHolder.
Returns the label.

o  addTextLabelOn: aStringHolder adjust: how
create a text label - the name has been choosen for ST-80 compatibility;
however, ST/X labels allow image labels too.
Returns the label.
The adjust argument must be one of #left, #right or #center (see Label for details)

o  addToInputFieldGroup: aComponentOrSubcomponent
add a component to the input group.
The argument, aComponentOrSubcomponent may even be a nested subcomponent of
a topLevel component.

o  addToInputFieldGroup: aComponentOrSubcomponent before: anotherComponent
add a component to the input group.
The argument, aComponentOrSubcomponent may even be a nested subcomponent of
a topLevel component.

o  removeFromInputFieldGroup: aComponentOrSubcomponent
remove a component from the input group.
The argument, aComponentOrSubcomponent may even be a nested subcomponent of
a topLevel component.

construction-buttons
o  addAbortAndOkButtons
create both abort- and Ok Buttons

o  addAbortButton
create an abortButton - to be sent from redefined initialize
methods in subclasses or when creating a box programmatically.
Returns the button.

o  addAbortButton: aButton
add an already created abortButton - to be sent from redefined initialize
methods in subclasses or when creating a box programmatically.
Returns the button.

o  addAbortButtonLabelled: buttonLabel
create an abortButton with a label - to be sent from redefined initialize
methods in subclasses or when creating a box programmatically.
A nil argument creates one with the default label.
Returns the button.

o  addButton: aButton
add a button into the buttonPanel.
Returns the button.
usage example(s):
^ self addButton:aButton after:nil

o  addButton: aButton after: someOtherButtonOrNil
add a button into the buttonPanel.
If the argument someOtherButtonOrNil is nil, the button is
added at the end.

o  addButton: aButton before: someOtherButtonOrNil
add a button into the buttonPanel.
If the argument someOtherButtonOrNil is nil, the button is
added upFront.

o  addHelpButtonFor: pathToHelpText
add a help button to the buttonPanel.
The argument, pathToHelpText should specify the path to the help
text under either the doc/online/<language> or the help/<language>
directory.

o  addHelpButtonWithAction: helpAction
add a help button to the buttonPanel.
The argument, helpAction is avaluated when clicked

o  addOK: checkBlock
what is checkBlock ?

o  addOkButton
create an okButton - to be sent from redefined initialize
methods in subclasses or when creating a box programmatically.
Returns the button.

o  addOkButton: aButton
add an already created okButton - to be sent from redefined initialize
methods in subclasses or when creating a box programmatically.
Returns the button.

o  addOkButtonLabelled: buttonLabel
create an okButton with a label - to be sent from redefined initialize
methods in subclasses or when creating a box programmatically.
A nil argument creates one with the default text.
Returns the button.

o  removeAbortButton
remove an already added okButton - only useful to change some already created
dialog afterwards

o  removeOkButton
remove an already added okButton - only useful to change some already created
dialog afterwards

construction-check & comboboxes
o  addCheckBox: label on: aModel
create a checkBox with label on aModel and add it.
Returns the box.

o  addCheckBox: label on: aModel tabable: tabable
create a checkBox with label on aModel and add it.
Returns the box.

o  addCheckBoxAtBottom: checkLabel on: aValueHolder
add a checkbox and make it stick at the bottom

o  addComboBoxOn: aModel
create a comboBoxView on aModel and add it.
Returns the comboBoxView.

o  addComboBoxOn: aModel list: list tabable: tabable
create a comboBoxView on aModel and add it.
Returns the comboBoxView.

o  addComboBoxOn: aModel tabable: tabable
create a comboBoxView on aModel and add it.
Returns the comboBoxView.

o  addComboListOn: aModel
create a comboListView on aModel and add it.
Returns the comboListView.

o  addComboListOn: aModel list: list tabable: tabable
create a comboListView on aModel and add it.
Returns the comboListView.

o  addComboListOn: aModel tabable: tabable
create a comboListView on aModel and add it.
Returns the comboListView.

o  addTriggerBox: label action: aBlock
create a triggerBox with label and action and add it.
Returns the box.

construction-inputfields
o  addFilenameInputFieldOn: aModel in: aDirectory tabable: tabable
create a fileName input field on aModel and add it.
Returns the field. This is much like a normal input field,
but supports filename completion.

o  addInputField: aField
add an already created input field.
Returns the field.

o  addInputField: aField tabable: tabable
add an already created input field.
If tabable is true, the field is put into a group, to allow
stepping through the fields with #Cursor/#Return keys.
Returns the field.

o  addInputFieldOn: aModel
create an input field on aModel and add it.
Returns the field.

o  addInputFieldOn: aModel tabable: tabable
create an input field on aModel and add it.
If tabable is false, the field cannot be tabbed into
and return does not close the box.
(pointer must be moved into it).
Returns the field.

o  addLabelledInputField: labelString adjust: labelAdjust on: model tabable: tabable from: leftX to: rightX separateAtX: relativeX
add a label and an inputField side-by-side.
The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0.
The label's string is defined by labelString and adjusted according to labelAdjust.
The inputField gets model as its model.
Return the inputField.

o  addLabelledInputField: labelString adjust: labelAdjust on: model tabable: tabable separateAtX: relativeX
add a label and an inputField side-by-side.
The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0.
The label's string is defined by labelString and adjusted according to labelAdjust.
The inputField gets model as its model.
Return the inputField.

construction-layout
o  addGap
VW compatibility

o  addGap: pixels
VW compatibility

o  addHorizontalLine
add a horizontal line as separator

o  addVerticalSpace
add a default vertical space (1 mm)

o  addVerticalSpace: nPixel
add some pixels of space to the next component

construction-lists
o  addList: listHolder lines: nLines validation: validateionBlock

o  addListBoxOn: aModel
add a selectionInListView to the box.
The listViews ScrollWrapper is returned

o  addListBoxOn: aModel class: aListViewClass
create & add an instance of aListViewClass to the box.
The listViews ScrollWrapper is returned

o  addListBoxOn: aModel class: aListViewClass withNumberOfLines: numLines
create and add an instance of aListViewClass to the box.
The list has numLines (if nonNil) number of lines shown.
The listViews ScrollWrapper is returned

o  addListBoxOn: aModel class: aListViewClass withNumberOfLines: numLines hScrollable: hs vScrollable: vs
add an instance of aListViewClass (selectionInListView) to the box.
The list has numLines (if nonNil) number of lines shown.
If scrolled, the ScrollWrapper is returned - otherwise the listView.

o  addListBoxOn: aModel withNumberOfLines: numLines
add a selectionInListView to the box.
The list has numLines (if nonNil) number of lines shown.
The listViews ScrollWrapper is returned

o  addListBoxOn: aModel withNumberOfLines: numLines hScrollable: hs vScrollable: vs
add a selectionInListView to the box.
The list has numLines (if nonNil) number of lines shown.
If scrolled, the ScrollWrapper is returned - otherwise the listView.

o  addPopUpList: labelString on: aModel
create a popUpList with a label on aModel and add it.
Returns the box.

o  addPopUpList: labelString on: aModel tabable: tabable
create a popUpList on aModel and add it.
Returns the popUpList.

o  addPopUpListOn: aModel
create a popUpList on aModel and add it.
Returns the box.

o  addPopUpListOn: aModel tabable: tabable
create a popUpList on aModel and add it.
Returns the popUpList.

o  addRadioButton: labelString on: aRadioButtonGroupModel value: radioValue tabable: tabable
create a radio button on aModel and add it.
Returns the radio button.

o  addTextBoxOn: aModel class: aListViewClass withNumberOfLines: numLines hScrollable: hs vScrollable: vs
add an instance of aListViewClass to the box.
The list has numLines (if nonNil) number of lines shown.
If scrolled, the ScrollWrapper is returned - otherwise the listView.

construction-rows & columns
o  addColumn: aRow fromX: leftX toX: rightX collect: aBlock
add some elements in a vertical column.
Equally space elements as returned from aBlock.

o  addColumn: aRow fromX: leftX toX: rightX collect: aBlock tabable: tabable
add some elements in a vertical column.
Equally space elements as returned from aBlock.

o  addColumn: aRow fromX: leftX toX: rightX collect: aBlock tabable: tabable horizontalLayout: hLayout
add some elements in a vertical column.
Equally space elements as returned from aBlock.

o  addRow: aCol fromX: leftX toX: rightX collect: aBlock
add some elements in a horizontal row.
Equally space elements as returned from aBlock.
Advance y.

o  addRow: aCol fromX: leftX toX: rightX collect: aBlock tabable: tabable
add some elements in a horizontal row.
Equally space elements as returned from aBlock.
Advance y.

o  addRow: aCol fromX: leftX toX: rightX collect: aBlock tabable: tabable horizontalLayout: hLayout
add some elements in a horizontal row.
Equally space elements as returned from aBlock.
Advance y.

o  addRow: aCol fromX: leftX toX: rightX collect: aBlock tabable: tabable horizontalLayout: hLayout verticalLayout: vLayout
add some elements in a horizontal row.
Equally space elements as returned from aBlock.
Advance y.

explicit focus control
o  focusOnOk

initialization & release
o  initialize
must be called if redefined

o  reAdjustGeometry
sent late in snapin processing - gives me a chance
to resize for changed font dimensions.

layout control
o  bottomAlign: widgets
mhmh - seems similar to our stickAtBottom functionality - to be checked

o  bottomAlignLowerEdge: widget
mhmh - seems similar to our stickAtBottom functionality - to be checked

o  leftIndent
return the current indent
(current x position - that's where the next component will be positioned).

o  leftIndent: aNumber
set the left indent
(current x position - that's where the next component(s) will be located).
Setting this before adding a component will place it indented

o  rightIndent
return the current right indent.

o  rightIndent: aNumber
set the right indent

o  setInitialGap

o  stickAtBottomWithFixHeight: aComponent
arrange for a component to be positioned at a constant offset
from the bottom of the box and its height to remain the same.
This will keep the component at a constant distance from the bottom
(without this setup, it would stay at a constant offset from the top).
ATTENTION: use this as a last step, after all components have been added.

o  stickAtBottomWithFixHeight: aComponent left: left right: right
arrange for a component to be positioned at a constant offset
from the bottom of the box and its height to remain the same.
This will keep the component at a constant distance from the bottom
(without this setup, it would stay at a constant offset from the top).
ATTENTION: use this as a last step, after all components have been added.

o  stickAtBottomWithVariableHeight: aComponent
arrange for a component to be positioned at a constant offset
from the bottom of the box and its height to be adjusted.
This will resize the component for a constant distance from the top,
and the bottom.
(without this setup, its height would remain constant).
ATTENTION: use this as a last step, after all components have been added.

o  yPosition
return the current y position
(that's where the next component will be positioned).

o  yPosition: aNumber
set the current y position
(that's where the next component will be positioned).

private
o  assignKeyboardFocusToFirstKeyboardConsumer
disabled - the focus might have already been changed

o  basicAddComponent: aComponent
add a component, don't change its size

o  forceResize
force a recomputation of my size.
Call this, when elements where added to a subcomponent,
of which I cannot know.
Eg. when someone gets the buttonPanel and adds an element to it

o  hideAndEvaluate: aBlock
if I am modal, make myself invisible and evaluate aBlock.
If nonModal, stay up, but also evaluate the block.

o  preOpen

o  realize
if any inputFields where added, activate the first one

o  resize
verticalPanel notNil ifTrue:[

queries
o  accepted
after the box has closed:
return true if accepted, false if canceled

o  interfaceSpecFor: aSelector
return an interface spec.
Notice - Dialog should be moved under AppModel so this becomes obsolete.

o  maxPreferredWidthOfAddedComponents
helper for computing my preferred extent.
That is the max component width

o  positionOffset
return the delta, by which the box should be displayed
from the mouse pointer. Here, an offset is returned, which
makes the center of the first return-Button in the panel
appear under the cursor. If there is no such button,
use my superclasses offset.

o  preferredExtent
return my preferred extent.
That is the max component width, or my current width (default);
whichever is larger, by the sum of the component's heights.
usage example(s):
If I have an explicit preferredExtent..
usage example(s):
If I have a cached preferredExtent value..
usage example(s):
^ super preferredExtent
usage example(s):
p := buttonPanel preferredExtent.

o  specificationFor: aKey
return an interface specs literal encoding.
Notice - Dialog should be moved under AppModel so this becomes obsolete.

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

o  actionArgument

o  closeCancel
closed via escape

o  doAccept
let all components accept (i.e. update their model from the values),
then set my accept value to true.
This is confusing: this method was originally called #accept,
but renamed for compatibility with ST-80, where #accept returns the
accept-valueHolder (which looks like a bad name to me ...).

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

o  lastFieldLeft
if the dialog involves input fields, this is called
when the last field is left by Return-key or NextField-key

o  okPressed
sent by the okButton; user pressed ok-button
- make myself invisible and if an action was specified do it

o  openDialog


Examples:


historically, DialogBox was used as an abstract class as a base for InfoBox, YesNoBox etc. However, the programmatic construction protocol (#addComponent:) now allows those classes to be easily replaced and future versions of ST/X may do this and make those subclasses obsolete. However, dummy stubs will remain to exist for backward compatibility (i.e. do not fear using YesNoBox, EnterBox etc.) For most simple standard dialogs, there are ready to use methods in the class protocol. For example: info & warnings:
    Dialog information:'hi there'
    Dialog warn:'oops'
yes/no questions:
    (Dialog confirm:'is this simple ?')
    ifTrue:[
        Transcript showCR:'thats what I expected'
    ] ifFalse:[
        Transcript showCR:'read more examples and documentation'
    ]
yes/no question with cancel option:
    |answer|

    answer := Dialog confirmWithCancel:'is this simple ?'.
    answer isNil ifTrue:[
        Transcript showCR:'no easy decision'
    ] ifFalse:[
        answer ifTrue:[
            Transcript showCR:'thats what I expected'
        ] ifFalse:[
            Transcript showCR:'read more examples and documentation'
        ]
    ]
asking for a string:
    |s|

    s := Dialog request:'enter your name, please:'.
    s notEmpty ifTrue:[
        Transcript showCR:'you entered: ' , s.
    ]
asking for a string with given default:
    |s|

    s := Dialog 
            request:'enter your name, please:'
            initialAnswer:(OperatingSystem getLoginName).
    s notEmpty ifTrue:[
        Transcript showCR:'you entered: ' , s.
    ]
asking for a filename:
    |s|

    s := Dialog 
            requestFileName:'select a file, please:'
            default:''.
    Transcript show:'you entered: '; showCR:s.
with a namefiler pattern:
    |s|

    s := Dialog 
            requestFileName:'select a file, please:'
            default:''
            pattern:'*.rc'.
    Transcript show:'you entered: '; showCR:s.
another namefiler pattern:
    |s|

    s := Dialog 
            requestFileName:'select a file, please:'
            default:''
            pattern:'*.rc;*.st;*.h'.
    Transcript show:'you entered: '; showCR:s.
with changed button label and pattern:
    |s|

    s := Dialog 
            requestFileName:'select a file, please:'
            default:''
            ok:'show'
            abort:'cancel'
            pattern:'*.rc'.
    Transcript show:'you entered: '; showCR:s.
asking for a password:
    |s|

    s := Dialog 
            requestPassword:'enter your secret, please:'.
    Transcript show:'you entered: '; showCR:s.
multiple choice dialogs:
    Dialog 
       choose:'choose any' 
       fromList:nil
       values:nil
       buttons:#('one' 'two' 'three' 'four') 
       values:#(1 2 3 4) 
       lines:nil
       cancel:nil
multiple choice dialog, with list & buttons:
     Transcript showCR:(
         Dialog 
            choose:'choose example' 
            fromList:#('one' 'two' 'three' 'four') 
            values:#(1 2 3 4) 
            buttons:#('five' 'six' 'seven')
            values:#(5 6 7)
            lines:4
            cancel:[Transcript flash. #aborted]
     )
You can (and often have to) construct custom dialogs programmatically, from individual components. As shown in the following examples: basic (unusable) example:
    DialogBox new open
still unusable - only an ok-button:
    DialogBox new addOkButton; open
both ok- and abortButtons:
    DialogBox new addAbortButton; addOkButton; open
with different ok-label:
    DialogBox new addAbortButton; addOkButtonLabelled:'yeah'; open
adding a (centered by default) textlabel gives an infoBox:
    DialogBox new
        addTextLabel:'hello';
        addOkButton; 
        open
a textlabel with abort- and okButton gives a yesNoBox:
    DialogBox new
        addTextLabel:'hello';
        addAbortButton; 
        addOkButton; 
        open
the same, adjusting the labels contents to the left:
    |box|

    box := DialogBox new.
    (box addTextLabel:'hello') adjust:#left.
    box addAbortButton; 
        addOkButton; 
        open
with modified buttons:
    |box|

    box := DialogBox new.
    (box addTextLabel:'are you certain ?') adjust:#left.
    box addAbortButtonLabelled:'not really'. 
    (box addOkButtonLabelled:'yes, absolutely') 
            activeBackgroundColor:Color red. 
    box open
mswindows style (different up/down bitmaps in buttons): ((try tabbing ...)
    |b box|

    box := DialogBox new.
    (box addTextLabel:'are you certain ?') adjust:#left.
    b := Button new.
    b activeLogo:(Image fromFile:'cancel_down.bmp' inPackage:'stx:goodies/bitmaps/winImages').
    b passiveLogo:(Image fromFile:'cancel_up.bmp' inPackage:'stx:goodies/bitmaps/winImages').
    b focusLogo:(Image fromFile:'cancel_focus.bmp' inPackage:'stx:goodies/bitmaps/winImages').
    b beImageButton.
    box addAbortButton:b.

    b := Button new.
    b activeLogo:(Image fromFile:'ok_down.bmp' inPackage:'stx:goodies/bitmaps/winImages').
    b passiveLogo:(Image fromFile:'ok_up.bmp' inPackage:'stx:goodies/bitmaps/winImages').
    b focusLogo:(Image fromFile:'ok_focus.bmp' inPackage:'stx:goodies/bitmaps/winImages').
    b beImageButton.
    box addOkButton:b.
    box open
two textlabels:
    DialogBox new
        addTextLabel:'hello';
        addTextLabel:'world';
        addAbortButton; 
        addOkButton; 
        open
fixing the dialog's size (suppress it calculating its size from the preferredExtents of its components):
    DialogBox new
        label:'a simple dialog';
        addTextLabel:'hello';
        addAbortButton; 
        addOkButton; 
        extent:200@200;
        sizeFixed:true;
        open
asking the box if it was closed via ok:
    (DialogBox new
        label:'a simple dialog';
        addTextLabel:'hello';
        addAbortButton; 
        addOkButton; 
        extent:200@200;
        sizeFixed:true;
        open
    ) accepted ifTrue:[
        Transcript showCR:'yes'
    ] ifFalse:[
        Transcript showCR:'no'
    ]
textLabels are not limited to strings (although, the name which is used for ST-80 compatibility, suggests it):
    DialogBox new
        addTextLabel:(Image fromFile:'garfield.gif' inPackage:'stx:goodies/bitmaps/gifImages');
        addOkButton; 
        open
    DialogBox new
        addTextLabel:'hello';
        addTextLabel:((Image fromFile:'garfield.gif' inPackage:'stx:goodies/bitmaps/gifImages')
                            magnifiedTo:200@150);
        addTextLabel:'world';
        addAbortButton; 
        addOkButton; 
        open
adding an input field (on a string model):
    |stringModel|

    stringModel := '' asValue.
    (DialogBox new
        addTextLabel:'Please enter a string:';
        addInputFieldOn:stringModel; 
        addAbortButton; 
        addOkButton; 
        open
    ) accepted ifTrue:[
        Transcript showCR:'entered: ', stringModel value
    ]
multiple input fields (notice, that the dialog connects the fields in a group, so stepping is allowed via Cursor and Return keys):
    |firstName lastName|

    firstName := '' asValue.
    lastName := '' asValue.
    (DialogBox new
        addTextLabel:'Please enter your name:';
        addInputFieldOn:firstName; 
        addVerticalSpace;
        addInputFieldOn:lastName; 
        addAbortButton; 
        addOkButton; 
        open
    ) accepted ifTrue:[
        Transcript showCR:'entered: ', firstName value , ' ' , lastName value
    ]
of course, the model may contain a value initially:
    |firstName lastName p line i name|

    firstName := '' asValue.
    lastName := '' asValue.
    p := PipeStream readingFrom:'finger ' , OperatingSystem getLoginName.
    p notNil ifTrue:[
        line := p nextLine.
        (i := line findString:'Name:') ~~ 0 ifTrue:[
            name := line copyFrom:(i + 'Name:' size).
        ] ifFalse:[
            (i := line findString:'real life:') == 0 ifTrue:[
                line := p nextLine.
            ].
            (i := line findString:'real life:') ~~ 0 ifTrue:[
                name := line copyFrom:(i + 'real life:' size).
            ]
        ].
        name notNil ifTrue:[
            firstName value: name asCollectionOfWords first.
            lastName  value: name asCollectionOfWords last.
            Transcript showCR:'initially ' , firstName value , ' ' , lastName value.
        ].
        p close.
    ].

    (DialogBox new
        addTextLabel:'Please enter your name:';
        addInputFieldOn:firstName; 
        addVerticalSpace;
        addInputFieldOn:lastName; 
        addAbortButton; 
        addOkButton;
        open
    ) accepted ifTrue:[
        Transcript showCR:'entered: ', firstName value , ' ' , lastName value
    ]
validated password entry:
    |box firstEntry secondEntry|

    firstEntry := '' asValue.
    secondEntry := '' asValue.

    box := DialogBox new.
    (box addTextLabel:'Please enter your secret:') adjust:#left.
    (box addInputFieldOn:firstEntry) passwordCharacter:$*. 
    box addVerticalSpace.
    (box addInputFieldOn:secondEntry) passwordCharacter:$*. 
    box addAbortButton. 
    box addOkButton. 
    box open.
    box accepted ifTrue:[
        firstEntry value ~= secondEntry value ifTrue:[
            Transcript showCR:'wrong input - try again'
        ] ifFalse:[
            Transcript showCR:'entered: ', firstEntry value
        ]
    ]
input fields with a label:
    |box firstNameHolder middleNameHolder lastNameHolder|

    firstNameHolder := 'John' asValue.
    middleNameHolder := 'F' asValue.
    lastNameHolder := 'Peters' asValue.

    box := DialogBox new.
    box 
        addLabelledInputField:'first name:'
        adjust:#right
        on:firstNameHolder
        tabable:true
        separateAtX:0.4.

    box 
        addLabelledInputField:'middle initial:'
        adjust:#right
        on:middleNameHolder
        tabable:true
        separateAtX:0.4.

    box 
        addLabelledInputField:'last name:'
        adjust:#right
        on:lastNameHolder
        tabable:true
        separateAtX:0.4.

    box addOkButton.
    box open.
constructing a dialog from other elements: adding a fileSelectionList: (since the dialog adds the component with its preferred extent, ignoring the 300-height, this looks ugly ... ... especially when resized vertically)
    |top l scr fileName|

    fileName := '' asValue.

    top := DialogBox new.

    l := FileSelectionList new.
    l useIndex:false.
    l doubleClickAction:[:name | top okPressed].
    l action:[:name | fileName value:name].
    scr := ScrollableView forView:l.
    scr extent:(1.0 @ 300).

    top addComponent:scr.
    top addAbortButton; addOkButton.
    top openModal.

    top accepted ifTrue:[
        Transcript show:'fileName: '; showCR:fileName value storeString.
    ]
same, looks better, since the height is made larger (not using fileLists preferredExtent):
    |top l scr fileName|

    fileName := '' asValue.

    top := DialogBox new.

    l := FileSelectionList new.
    l useIndex:false.
    l doubleClickAction:[:name | top okPressed].
    l action:[:name | fileName value:name].
    scr := ScrollableView forView:l.

    top addComponent:scr withExtent:300@300.
    top addAbortButton; addOkButton.
    top openModal.

    top accepted ifTrue:[
        Transcript show:'fileName: '; showCR:fileName value storeString.
    ]
again, setting the boxes initial size and fixing it (let it ignore the components' preferredExtent):
    |top fixFrame l scr fileName|

    fileName := '' asValue.

    top := DialogBox new.
    top extent:300@300.

    fixFrame := View new.
    fixFrame extent:(1.0 @ 300).

    l := FileSelectionList new.
    l useIndex:false.
    l doubleClickAction:[:name | top okPressed].
    l action:[:name | fileName value:name].
    scr := ScrollableView forView:l.
    scr origin:0.0@0.0 corner:1.0@1.0.
    fixFrame add:scr.

    top addComponent:fixFrame.
    top addAbortButton; addOkButton.
    top openModal.

    top accepted ifTrue:[
        Transcript show:'fileName: '; showCR:fileName value storeString.
    ]
adding a panel with checkBoxes:
    |top panel b value1 value2 value3 value4|

    value1 := true asValue.
    value2 := false asValue.
    value3 := false asValue.
    value4 := true asValue.

    top := DialogBox new.
    top extent:200@300.

    panel := VerticalPanelView new.

    b := CheckBox on:value1. b label:'check1'.
    panel addSubView:b.

    b := CheckBox on:value2. b label:'check2'.
    panel addSubView:b.

    b := CheckBox on:value3. b label:'check3'.
    panel addSubView:b.

    b := CheckBox on:value4. b label:'check4'.
    panel addSubView:b.

    top addComponent:panel.
    top addAbortButton; addOkButton.
    top open.

    top accepted ifTrue:[
        Transcript show:'value1: '; showCR:value1 value.
        Transcript show:'value2: '; showCR:value2 value.
        Transcript show:'value3: '; showCR:value3 value.
        Transcript show:'value4: '; showCR:value4 value.
    ]
same, using a more convenient interface:
    |box value1 value2 value3 value4|

    value1 := true asValue.
    value2 := false asValue.
    value3 := false asValue.
    value4 := true asValue.

    box := DialogBox new.
    box extent:200@300.

    box addCheckBox:'check1' on:value1.
    box addVerticalSpace.
    box addCheckBox:'check2' on:value2.
    box addVerticalSpace.
    box addCheckBox:'check3' on:value3.
    box addVerticalSpace.
    box addCheckBox:'check4' on:value4.

    box addAbortButton; addOkButton.
    box open.

    box accepted ifTrue:[
        Transcript show:'value1: '; showCR:value1 value.
        Transcript show:'value2: '; showCR:value2 value.
        Transcript show:'value3: '; showCR:value3 value.
        Transcript show:'value4: '; showCR:value4 value.
    ]
same, using an even better interface:
    |box values labels|

    values := #(true false false true) collect:[:val | val asValue].
    labels := #('check1' 'check2' 'check3' 'check4').

    box := Dialog new.

    box
       addColumn:(1 to:labels size)
       fromX:0.0
       toX:1.0 
       collect:[:index | CheckBox label:(labels at:index) model:(values at:index)]
       tabable:true.
    
    box addAbortButton; addOkButton.
    box open.

    box accepted ifTrue:[
       values with:labels do:[:val :lbl |
          Transcript show:(lbl , ': '); showCR:val value.
       ]
    ]
adding two panels in a frame:
    |box frame vPanel1 vPanel2 m1 m2 m3 m4 chk ef|

    box := Dialog new.
    box label:'example'.

    frame := FramedBox label:'frame'.

    vPanel1 := VerticalPanelView origin:0.0@0.0 corner:0.5@1.0 in:frame.
    vPanel1 horizontalLayout:#leftSpace.
    vPanel1 verticalLayout:#spreadSpace.

    vPanel2 := VerticalPanelView origin:0.5@0.0 corner:1.0@1.0 in:frame.
    vPanel2 horizontalLayout:#leftSpace.
    vPanel2 verticalLayout:#spreadSpace.

    m1 := true asValue.
    m2 := true asValue.
    m3 := true asValue.
    m4 := 'hello' asValue.

    vPanel1 add:(Label label:'check1').
    vPanel1 add:(Label label:'m2').
    vPanel1 add:(Label label:'m3').
    vPanel1 add:(Label label:'enter').
    vPanel1 add:(Label label:'lbl1').
    vPanel1 add:(Label label:'lbl2').

    vPanel2 add:(chk := CheckToggle on:m1). 
    box makeTabable:chk.

    vPanel2 add:(chk := CheckToggle on:m2). 
    box makeTabable:chk.

    vPanel2 add:(chk := CheckToggle on:m3). 
    box makeTabable:chk.

    vPanel2 add:(chk := CheckToggle on:m3). 
    box makeTabable:chk.

    vPanel2 add:(chk := CheckToggle on:m3). 
    box makeTabable:chk.

    vPanel2 add:(ef := EditField on:m4). 
    ef immediateAccept:true.
    box makeTabable:ef.

    box addComponent:frame.

    box addAbortButton; addOkButton.
    box openModal.
    box accepted ifTrue:[
        Transcript showCR:'accepted with:'.
        Transcript showCR:'   m1: ' , m1 value printString.
        Transcript showCR:'   m2: ' , m2 value printString.
        Transcript showCR:'   m3: ' , m3 value printString.
        Transcript showCR:'   m4: ' , m4 value printString.
    ]
a full example (combined settings dialog - as in launcher):
    |box warnSTX allowUnderscore immutableArrays logDoits
     listOfLanguages listOfStyles styleNames 
     frame panel c resourceDir dir |

    warnSTX := Compiler warnSTXSpecials asValue.
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
    immutableArrays := Compiler arraysAreImmutable asValue.

    logDoits := Smalltalk logDoits asValue.

    listOfLanguages := SelectionInList with:#('english'
                                              'french'
                                              'german'
                                              'italian'
                                              'spanish'
                                             ).
    listOfLanguages selection:(Language asString).


    resourceDir := Smalltalk getSystemFileName:'resources'.
    dir := FileDirectory directoryNamed:resourceDir.

    styleNames := dir select:[:aFileName | aFileName endsWith:'.style'].
    styleNames := styleNames collect:[:aFileName | aFileName copyWithoutLast:6].
    listOfStyles := SelectionInList with:styleNames sort.
    listOfStyles selection:(View defaultStyle asString).

    box := Dialog new.
    box label:'Settings'.

    frame := FramedBox label:'Compiler'.
    panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:frame.
    panel horizontalLayout:#leftSpace.

    panel add:((CheckBox on:warnSTX) label:'warn about ST/X language extensions'; resize).
    panel add:((CheckBox on:allowUnderscore) label:'allow underscore in identifiers'; resize).
    panel add:((CheckBox on:immutableArrays) label:'literal arrays are immutable'; resize).
    box addComponent:frame.

    frame := FramedBox label:'Misc'.
    panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:frame.
    panel horizontalLayout:#leftSpace.

    panel add:((CheckBox on:logDoits) label:'log doIts in changes file'; resize).
    box addComponent:frame.

    frame := FramedBox label:'Language'.
    panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:frame.
    panel horizontalLayout:#leftSpace.

    panel add:((PopUpList on:listOfLanguages) width:0.5).
    box addComponent:frame.

    frame := FramedBox label:'Style'.
    panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:frame.
    panel horizontalLayout:#leftSpace.

    panel add:((PopUpList on:listOfStyles) width:0.5).
    box addComponent:frame.

    box addAbortButton; addOkButton.
    box showAtPointer.

    box accepted ifTrue:[
        Transcript topView withCursor:Cursor wait do:[
            Compiler warnSTXSpecials:warnSTX value.
            Compiler allowUnderscoreInIdentifier:allowUnderscore value.
            Compiler arraysAreImmutable:immutableArrays value.

            Smalltalk logDoits:logDoits value.

            Transcript showCR:'change language to ' , listOfLanguages selection , ' ...'.
            Smalltalk at:#Language put:listOfLanguages selection asSymbol.
            Smalltalk changed:#Language.
            ResourcePack flushCachedResourcePacks.

            Transcript showCR:'change style to ' , listOfStyles selection , ' ...'.
            View defaultStyle:listOfStyles selection asSymbol.
        ]
    ]
an example from Hopkins/Horan:
    |aText index|

    aText := 'Smalltalk/X: An Introduction to Application Development' asText.
    index := aText findString:'Smalltalk/X' startingAt:1.
    aText emphasizeFrom:index 
                     to:'Smalltalk/X' size + index - 1
                   with:#bold.
    index := aText findString:'Introduction' startingAt:index.
    aText emphasizeFrom:index 
                     to:'Introduction' size + index - 1
                   with:#italic.
    Dialog warn:aText        
    
the same, with colors:
    |aText index|

    aText := 'Smalltalk/X: An Introduction to Application Development' asText.
    index := aText findString:'Smalltalk/X' startingAt:1.
    aText emphasizeFrom:index 
                     to:'Smalltalk/X' size + index - 1
                   with:(Array with:#bold with:#underline with:(#color->Color red)).
    index := aText findString:'Introduction' startingAt:index.
    aText emphasizeFrom:index 
                     to:'Introduction' size + index - 1
                   with:#italic.
    Dialog warn:aText        


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sun, 22 Jul 2018 06:41:00 GMT