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.34 date: 2021/01/20 15:35:53
user: cg
file: FilenameWidgetWithHistory.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


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

copyright

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

Instance protocol:

accessing
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
(comment from inherited method)
return nil - simpleViews have no model (only providing geometric)

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  acceptOnExpand: aBoolean
set/clear autoAccept on filename expansion (pressing tab key).
The default is true, which means that an expand accepts

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
(comment from inherited method)
ignored here; present for compatibility with some textView subclasses,
so that UIPainter can handle it in its TextView spec (which contains a
readOnly field)

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

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

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:24:46 GMT