eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SimpleDialog':

Home

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

Class: SimpleDialog


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--SimpleDialog
            |
            +--AbstractSettingsApplication::SourceCodeManagementSettingsAppl::PerModuleManagerSettingDialog
            |
            +--BookmarkEditor
            |
            +--BookmarksEditDialog
            |
            +--FileDialog
            |
            +--PerforceSourceCodeManagerUtilities::P4CheckinInfoDialog
            |
            +--PerforceSourceCodeManagerUtilities::SubmitInfoDialog
            |
            +--Tools::ChangeSetDiffTool::OpenDialog
            |
            +--Tools::ChangeSetSelectionDialog
            |
            +--Tools::CheckinInfoDialog
            |
            +--Tools::HierarchicalChangesetDialog
            |
            +--Tools::LintRuleEditDialog
            |
            +--Tools::LintRuleSelectionDialog
            |
            +--Tools::NewClassWizardDialog
            |
            +--Tools::ProjectLoader

Package:
stx:libview2
Category:
Interface-Framework
Version:
rev: 1.74 date: 2023/11/23 08:33:39
user: stefan
file: SimpleDialog.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


Use SimpleDialog to specify Dialogs with a windowSpec built by the GUI Builder.

Notice: this class was implemented using protocol information
from alpha testers and PD code - it may not be complete or compatible to
the corresponding ST-80 class. If you encounter any incompatibilities,
please forward a note to the ST/X team.

Hints:
    to provide a helpSpec, either add it to the builder's bindings;
    (I will fetch help also via: 'self aspectFor:#helpSpec')
    or define the dialog's masterApplication
    (I will ask it for help texts then)

copyright

COPYRIGHT (c) 1996 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

queries
o  isVisualStartable
return true, if this application can be started via #open.
(to allow start of a change browser via double-click in the browser)


Instance protocol:

DialogBox compatibility
o  destroy

o  hide

accessing
o  accept
return the valueholder which gets set to true by the accept button.
Also, when this valueHolder gets a true stuffed into it, the dialog is closed.
This valueHolder is also set to true, if the acceptValue get a value stored into.

o  acceptValue: anObject
save anObject in acceptedValue (to be passed back to the opened of this dialog),
and set the accept-holder to true, which closes the dialog window.
This is similar to a regular accept, but allows for a particular return-value to be passed
back.

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

o  acceptedValue
an additional value which can be passed back to the one who opened a dialog

o  bindings
return my builder's bindings

o  cancel
return the valueholder which gets set by the cancel button.
Also, when this valueHolder gets a true stuffed into it, the
dialog is closed.

o  escapeIsCancel
return the escapeIsCancel setting

o  escapeIsCancel: aBoolean
set/clear the escapeIsCancel option.
If on, an ESC-key will be treated like a cancel action.

o  postBuildBlock: aBlock
set postBuildBlock; if non-nil, this is evaluated after the build process

o  postOpenBlock: aBlock
set the postOpenBlock; if non-nil, this is evaluated after the view is opened

o  preBuildBlock: aBlock
set the preBuildBlock; if non-nil, this is evaluated before the view is constructed

o  source: anApplication
define the application which provides resources, aspects etc.

accessing-channels
o  closeAllowedChannel
return the value-provider which controls if close is allowed.
This is initialized to true.

o  closeAllowedChannel: aValueHolderOrBlock
set a value-provider which controls if close is allowed.

o  closeChannel
return the closeChannel; If a true is stuffed into this valueHolder,
I will close myself.

accessing-window
o  minWidth: nPixels
box := builder window displayBox.

closing
o  closeAccept
accept was pressed. close the dialog

o  closeCancel
cancel was pressed. close the dialog

o  closeDownViews
close down the application's view(s).
Redefined to do not do closeDownViews on the WindowGroup
(because I may have been reparented to anothe WindowGroup, e.g. an ExpeccoControlWindow.

o  closeRequest
this is sent by my topView when about to be closed
by the program (not by the windowManager).
Notice, that we get a closeRequest message if closed by the windowManager,
which can be rejected by the app (or confirmed via a dialog)
This is treated like a cancel.

o  closeWindow
close the dialog

o  requestForWindowClose
the dialog is about to be closed - this method is invoked and may
return false to suppress the close.
Here the value of closeAllowedChannel is returned, which is
set to true initially.
You may redefined this in a special dialog, and/or provide a boolean
valueHolder or a boolean block via the #closeAllowedChannel: method.

forced actions
o  doAccept
force accept

o  doCancel
force cancel

initialization
o  initialize
must be called if redefined

o  initializeBuilderFor: aView

o  initializeWindowFor: aView

opening-dialogInterface
o  allButOpenFor: anApplication interfaceSpec: aSpec withBindings: bindings
create the dialog for some appModel from a given spec but do not open it
the bindings argument may provide overwriting bindings for the dialog.

o  allButOpenFrom: aSpec
create my views but do not open the main window

o  openDialogSpec: aSpec withBindings: bindings
open myself - return true if accepted

o  openFor: anApplication interface: aSelector
open the dialog for some appModel from a given spec;
Return true if accepted, false if canceled

o  openFor: anApplication interface: anInterfaceSymbolOrSpecOrArray withBindings: bindings
open the dialog for some appModel from a given specSymbol;
the application must provide an interfaceSpec for that symbol.
The bindings argument may provide overwriting bindings for the
dialog.
Return true if accepted, false if canceled

o  openFor: anApplication interfaceSpec: aSpec withBindings: bindings
open the dialog for some appModel from a given spec;
the bindings argument may provide overwriting bindings for the
dialog.
Return true if accepted, false if canceled

o  openFor: anApplication spec: aSpec withBindings: bindings
open the dialog for some appModel from a given spec.
The bindings argument may provide overwriting bindings for the
dialog.
Return true if accepted, false if canceled

o  openFrom: anInterfaceSpec
open the dialog from a given spec;
return true if accepted, false if canceled

o  openInterface: aSymbol
open a standard interface.
Redefined to return the accept value instead of the builder.

o  openInterface: aSymbol at: position
open a standard interface.
Redefined to return the accept value instead of the builder.

o  openModelessFor: anApplication interfaceSpec: aSpec withBindings: bindings
open the dialog for some appModel from a given spec;
the bindings argument may provide overwriting bindings for the
dialog.
Return immediately, not blocking the caller

o  openModelessFor: anApplication spec: aSpec withBindings: bindings
open the dialog for some appModel from a given spec.
The bindings argument may provide overwriting bindings for the
dialog.
Return immediately (i.e non-blocking the caller)

o  openSpec: aWindowSpec
open a window spec.
Redefned to open modal and to return the accept value instead
of the builder.

o  openSpec: anInterfaceSpec withBindings: bindings
open the dialog with a given spec;
The bindings argument is mandatory and provides aspect bindings for the
dialog.
Return true if accepted, false if canceled

o  postBuildWith: aBuilder
this is sent after the dialog's widgets have been created
(but before the dialog is opened).
If a postBuildBlock was set, evaluate it here.

o  postOpenWith: aBuilder
this is sent after the dialog's main window is opened.
If a postOpenBlock was set, evaluate it here.

o  preBuildWith: aBuilder
this is sent before the dialog's widgets are created.
If a preBuildBlock was set, evaluate it here.

o  preOpen
arrange for #closeAccept & #closeCancel to be invoked when
either accept or close is triggered
(usually the models of corresponding buttons)

o  preOpenWith: aBuilder
this is sent after the dialog's main window is opened.
If a postOpenBlock was set, evaluate it here.

queries
o  defaultWindowType
SimpleDialogs come up modal, by default

o  shouldRememberLastExtent
if true is answered, the application's extent is remembered on close
and used as a default when opened the next time.
Redefined to only remember if accepted

testing
o  isDialog
(comment from inherited method)
answer true, if I am an application representing a dialog



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:25:40 GMT