eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FilenameWidgetWithHistory':

Home

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

Class: FilenameWidgetWithHistory


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--FilenameWidgetWithHistory
               |
               +--FilenameWidgetWithoutHistory

Package:
stx:libwidg2
Category:
Views-Interactors
Version:
rev: 1.30 date: 2018/11/09 23:27:37
user: cg
file: FilenameWidgetWithHistory.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Gittinger

Description:


A Filename InputField with history-list and a browse-button, which opens a file dialog.


Related information:

    ComboBoxView
    FilenameEditField
    FilenameComboBoxView

Instance protocol:

accessing
o  acceptOnExpand: aBoolean

o  baseDirectory

o  baseDirectory: something

o  contents

o  dialogTitle: something
set the dialog's title

o  directoriesOnly: aBoolean
if true, directories are selectable only.
If both filesOnly and directoriesOnly are false, which is the default,
anything is selectable.

o  fileNameTranslationHook

o  fileNameTranslationHook: aBlock
an optional hook which gets the filename from the editField
and produces a full path for the file dialog (in the ...-button).
Use this, if the filename contains $(xxx) variables to be expanded

o  filesOnly: aBoolean
if true, files are selectable only.
If both filesOnly and directoriesOnly are false, which is the default,
anything is selectable.

o  historyList

o  historyList: aCollection
set the history - useful when two or more such fields shall share a common history

o  initialDirectoryHolder
can be used to force the file-dialog into some initial directory

o  model

o  model: aFilenameHolder

o  selectAllInitially

accessing-channels
o  acceptChannel: aValueHolder

o  backgroundChannel

o  backgroundChannel: aValueHolder

o  enableChannel: aValueHolder

o  foregroundChannel

o  foregroundChannel: aValueHolder

o  modifiedChannel: aValueHolder

accessing-editField attributes
o  acceptIfUnchanged: aBoolean

o  acceptOnLeave: aBoolean

o  acceptOnLostFocus: aBoolean

o  acceptOnPointerLeave: aBoolean

o  acceptOnReturn: aBoolean

o  acceptOnTab: aBoolean

o  contents: aString

o  immediateAccept: aBoolean

o  maxChars: aBoolean

o  readOnly: aBoolean

initialization
o  initialize
(comment from inherited method)
initialize all state of the view - usually redefined in subclasses,
but always doing a 'super initialize'. Each class should setup its
locals - and not forget the others.
View setup is separated into two parts, the general setup done here
and the style specific setup in initStyle. Each view should be prepared
for a stylechange by being sent another initStyle with a new style value.
(in this case, it should set all of its style-dependent things, but
leave the state and contents as-is)

o  initializeBrowseButton

o  initializeFilenameField

queries
o  computePreferredExtent
max: browseButton preferredExtent y

user actions
o  browseForDestinationDirectory

o  browseForFileOrDirectory
lastDirectoryHolder value:path directory.


Examples:


     |top b|

     top := StandardSystemView new.
     top extent:(300 @ 200).

     b := FilenameWidgetWithHistory in:top.
     b origin:(0.0 @ 0.0) corner:(1.0 @ 0.0).
     b bottomInset:(b preferredExtent y negated).

     top open.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 18 Apr 2024 22:49:53 GMT