FSelBox.st
author Claus Gittinger <cg@exept.de>
Fri, 19 Apr 1996 14:35:26 +0200
changeset 548 c418699a90c0
parent 438 8df6f72d1569
child 585 8f395aba0173
permissions -rw-r--r--
moved all request methods (class protocol) to DialogBox
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     1
"
5
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1990 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
     3
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     4
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    11
"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    12
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    13
ListSelectionBox subclass:#FileSelectionBox
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    14
	instanceVariableNames:'patternField selectingDirectory'
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    15
	classVariableNames:''
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    16
	poolDictionaries:''
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    17
	category:'Views-DialogBoxes'
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    18
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    19
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    20
!FileSelectionBox class methodsFor:'documentation'!
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    21
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    22
copyright
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    23
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    24
 COPYRIGHT (c) 1990 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
    25
	      All Rights Reserved
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    26
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    27
 This software is furnished under a license and may be used
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    28
 only in accordance with the terms of that license and with the
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    30
 be provided or otherwise made available to, or used by, any
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    31
 other person.  No title to or ownership of the software is
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    32
 hereby transferred.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    33
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    34
!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    35
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    36
documentation
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    37
"
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    38
    this class implements file selection boxes. Instances show a list of
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    39
    files, and perform an action block with the selected pathname as
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    40
    argument when ok is clicked. It is also possible, to open the box
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    41
    without action and ask it afterward if it has been left with ok
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    42
    (i.e. the ST-80 way, asking 'aBox accepted ifTrue:[...]')
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    43
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    44
    There is an optional PatternField, which shows itself when a pattern
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    45
    is defined (i.e. if there is no pattern, it is hidden). 
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    46
    If there is a pattern, only files matching the pattern are shown in 
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    47
    the list. Directories are not affected by the patternField.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    48
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    49
    In addition, there is an optional matchBlock (actually this is defined 
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    50
    in the FileSelectionList). Only names for which this matchblock
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    51
    returns true will be presented. The matchBlock affects both regular files
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    52
    and names of directories. The argument passed to the matchBlock is the full
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    53
    pathname.
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    54
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    55
    All of the actual work is done in the fileList; see the documentation
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    56
    of FileSelectionList for more options 
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    57
    (you can access a boxes fileList via 'aBox>>listView' and get access to all
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    58
     of those fancy settings)
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    59
    For example, by accessing the list, it is possible to hide all directories 
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    60
    ('aBox listView ignoreDirectories:true'), to hide the parentDirectory alone 
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    61
    ('aBox listView ignoreParentDirectory') and to turn off the marking 
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    62
    of subdirectories ('aBox listView markSubdirectories:false').
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    63
"
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    64
!
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    65
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    66
examples 
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    67
"
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    68
  simple standard queries
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    69
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    70
    very simple:
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    71
        |name|
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    72
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    73
        name := FileSelectionBox requestFilename.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    74
        Transcript showCr:name
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    75
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    76
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    77
    simple:
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    78
        |name|
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    79
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    80
        name := FileSelectionBox requestFilename:'which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    81
        Transcript showCr:name
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    82
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    83
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    84
    with initial selection:
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    85
        |name|
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    86
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    87
        name := FileSelectionBox requestFilename:'which file ?' default:'Make.proto'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    88
        Transcript showCr:name
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    89
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    90
12
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
    91
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    92
  more detailed setup
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    93
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    94
    setting title:
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    95
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    96
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    97
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    98
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
    99
        box open.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   100
        box accepted ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   101
            Transcript showCr:'you selected: ' , box
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   102
        ]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   103
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   104
    setting a matchpattern:
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   105
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   106
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   107
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   108
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   109
        box pattern:'*.rc'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   110
        box open
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   111
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   112
    setting multiple patterns:
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   113
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   114
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   115
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   116
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   117
        box pattern:'*.rc;*.st'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   118
        box open
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   119
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   120
    setting a matchblock:
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   121
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   122
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   123
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   124
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   125
        box directory:'/etc'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   126
        box pattern:'*'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   127
        box matchBlock:[:name | name asFilename baseName first between:$a and:$z].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   128
        box open
44
f5e3a267fe4e pass fullname to matchblock
claus
parents: 41
diff changeset
   129
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   130
    both pattern and matchBlock:
44
f5e3a267fe4e pass fullname to matchblock
claus
parents: 41
diff changeset
   131
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   132
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   133
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   134
        box title:'Which directory ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   135
        box selectingDirectory:true.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   136
        box pattern:'l*'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   137
        box matchBlock:[:name | OperatingSystem isDirectory:name].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   138
        box action:[:fn | Transcript showCr:fn].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   139
        box open
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   140
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   141
    dont show the parent directory:
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   142
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   143
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   144
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   145
        box title:'Which directory ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   146
        box listView ignoreParentDirectory:true.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   147
        box open
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   148
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   149
    dont show any directory:
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   150
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   151
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   152
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   153
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   154
        box listView ignoreDirectories:true.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   155
        box open
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   156
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   157
    dont show any directory or hidden file:
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   158
    (notice the basename extraction - we are not interrested in the full pathName)
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   159
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   160
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   161
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   162
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   163
        box listView ignoreDirectories:true.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   164
        box matchBlock:[:name | (name asFilename baseName startsWith:'.') not].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   165
        box open
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   166
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   167
    dont allow direct filename entry:
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   168
    (i.e. avoid the user choosing files from other directories)
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   169
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   170
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   171
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   172
        box title:'Which one ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   173
        box enterField beInvisible.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   174
        box open.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   175
        box accepted ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   176
            Transcript showCr:'path is ' , box pathName
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   177
        ].
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   178
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   179
    combined with above directory ignoring,
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   180
    this limits selection of files from a single directory:
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   181
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   182
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   183
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   184
        box title:'Which file ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   185
        box enterField beInvisible.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   186
        box listView ignoreDirectories:true.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   187
        box open.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   188
        box accepted ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   189
            Transcript showCr:'path is ' , box pathName
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   190
        ].
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   191
238
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   192
    finally, an action:
a81e517187e4 examples
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   193
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   194
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   195
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   196
        box title:'Which directory ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   197
        box pattern:'l*'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   198
        box matchBlock:[:name | OperatingSystem isDirectory:name].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   199
        box action:[:name | Transcript showCr:name].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   200
        box open
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   201
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   202
  concrete examples:
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   203
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   204
    only show files beginning with lowercase characters
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   205
    and ending in '.c':
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   206
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   207
        |box|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   208
        box := FileSelectionBox new.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   209
        box title:'Which directory ?'.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   210
        box matchBlock:[:name |
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   211
                            box pathName asFilename isDirectory
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   212
                            or:[name first isLowercase
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   213
                                and:[name endsWith:'.c']]
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   214
                       ].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   215
        box open.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   216
        box accepted ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   217
            Transcript showCr:'full path:  ' , box pathName.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   218
            Transcript showCr:'files name: ' , box fileName.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   219
            Transcript showCr:'directory : ' , box directory.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   220
        ]
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   221
"
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   222
! !
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   223
12
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   224
!FileSelectionBox class methodsFor:'defaults'!
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   225
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   226
listViewType
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   227
    "return the type of listView - using a FileSelectionList here"
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   228
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   229
    ^ FileSelectionList
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   230
! !
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   231
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   232
!FileSelectionBox methodsFor:'accessing'!
3
claus
parents: 0
diff changeset
   233
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   234
contents
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   235
    "return the current entered value (i.e. the enterFields string).
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   236
     redefined to return the full pathname."
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   237
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   238
    |string sep|
3
claus
parents: 0
diff changeset
   239
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   240
    string := super contents.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   241
    string isNil ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   242
	^ selectionList directory pathName
121
claus
parents: 120
diff changeset
   243
    ].
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   244
    sep := Filename separator.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   245
    (string startsWith:sep) ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   246
	^ string
77
565b052f5277 *** empty log message ***
claus
parents: 62
diff changeset
   247
    ].
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   248
    ^ (selectionList directory pathName asFilename construct:string) asString
132
claus
parents: 130
diff changeset
   249
!
claus
parents: 130
diff changeset
   250
296
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   251
directory
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   252
    "return the directory which is currently shown"
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   253
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   254
    ^ selectionList directory
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   255
!
e1b9431b3aef more examples in the documentation category
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   256
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   257
directory:directoryName
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   258
    "change the directory shown in the list."
41
2f8d0f8e796b update list when namefiled cannot complete name
claus
parents: 38
diff changeset
   259
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   260
    selectionList directory:directoryName
132
claus
parents: 130
diff changeset
   261
!
claus
parents: 130
diff changeset
   262
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   263
fileName
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   264
    "if some filename has been entered, return it (without the directory path)
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   265
     otherwise, return nil"
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   266
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   267
    |string|
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   268
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   269
    string := super contents.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   270
    string isNil ifTrue:[^ nil].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   271
    ^ self pathName
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   272
!
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   273
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   274
matchBlock:aBlock
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   275
    "set the matchBlock (in the selectionList). Only files
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   276
     for which the block returns true are shown.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   277
     The matching is actually done in the fileSelectionList."
77
565b052f5277 *** empty log message ***
claus
parents: 62
diff changeset
   278
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   279
    selectionList matchBlock:aBlock 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   280
!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   281
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   282
openOn:aPath
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   283
    "open the box showing files in aPath.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   284
     This is only a shortcut message - no new functionality."
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   285
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   286
    self directory:aPath.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   287
    self showAtPointer
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   288
!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   289
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   290
pathName
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   291
    "same as contents - return the full pathname of the selected file,
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   292
     or the pathname of the directory if nothing has been entered"
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   293
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   294
    ^ self contents
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   295
!
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   296
3
claus
parents: 0
diff changeset
   297
pattern:aPattern
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   298
    "set the pattern - this also enables the PatternField
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   299
     (if the pattern is non-nil) or hides it (if nil)."
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   300
130
claus
parents: 121
diff changeset
   301
    |hidePatternField focusSequence|
claus
parents: 121
diff changeset
   302
3
claus
parents: 0
diff changeset
   303
    patternField initialText:aPattern.
12
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   304
    selectionList pattern:aPattern.
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   305
    aPattern isNil ifTrue:[
130
claus
parents: 121
diff changeset
   306
	hidePatternField := true.
59
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
   307
	realized ifTrue:[
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
   308
	    patternField hide.
77
565b052f5277 *** empty log message ***
claus
parents: 62
diff changeset
   309
	].
130
claus
parents: 121
diff changeset
   310
	focusSequence := (Array 
claus
parents: 121
diff changeset
   311
			     with:enterField 
claus
parents: 121
diff changeset
   312
			     with:selectionList 
claus
parents: 121
diff changeset
   313
			     with:okButton 
claus
parents: 121
diff changeset
   314
			     with:abortButton)
12
1c8e8c53e8cf *** empty log message ***
claus
parents: 7
diff changeset
   315
    ] ifFalse:[
130
claus
parents: 121
diff changeset
   316
	hidePatternField := false.
59
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
   317
	realized ifTrue:[
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
   318
	    patternField realize.
450ce95a72a4 *** empty log message ***
claus
parents: 44
diff changeset
   319
	].
130
claus
parents: 121
diff changeset
   320
	focusSequence := (Array 
claus
parents: 121
diff changeset
   321
			     with:patternField 
claus
parents: 121
diff changeset
   322
			     with:enterField 
claus
parents: 121
diff changeset
   323
			     with:selectionList 
claus
parents: 121
diff changeset
   324
			     with:okButton 
claus
parents: 121
diff changeset
   325
			     with:abortButton)
claus
parents: 121
diff changeset
   326
    ].
claus
parents: 121
diff changeset
   327
claus
parents: 121
diff changeset
   328
    patternField hiddenOnRealize:hidePatternField.
claus
parents: 121
diff changeset
   329
    windowGroup notNil ifTrue:[
claus
parents: 121
diff changeset
   330
	windowGroup focusSequence:focusSequence
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   331
    ].
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   332
!
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   333
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   334
selectingDirectory:aBoolean
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   335
    selectingDirectory := aBoolean.
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   336
    aBoolean ifTrue:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   337
        selectionList directoryChangeAction:[:entry | self directoryChanged].
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   338
        selectionList directorySelectAction:[:entry | self directorySelected].
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   339
        selectionList ignoreFiles:true.
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   340
    ]
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   341
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   342
    "Modified: 18.4.1996 / 18:50:10 / cg"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   343
! !
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   344
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   345
!FileSelectionBox methodsFor:'change & update'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   346
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   347
update:something with:argument from:changedObject
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   348
    |commonName index s|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   349
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   350
    something == #directory ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   351
	"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   352
	 sent by fileNameEnterField, if a filename
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   353
	 completion was not possible due to multiple
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   354
	 matches.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   355
	"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   356
	selectionList directory:argument.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   357
	s := enterField contents.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   358
	s notNil ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   359
	    commonName := s asFilename baseName.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   360
	    commonName size > 0 ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   361
		index := selectionList list findFirst:[:entry | entry startsWith:commonName].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   362
		index ~~ 0 ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   363
		    selectionList makeLineVisible:index
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   364
		]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   365
	    ]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   366
	]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   367
    ]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   368
! !
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   369
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   370
!FileSelectionBox methodsFor:'initialization'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   371
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   372
createEnterField
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   373
    "if the (optional) class FilenameEditField is present, use
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   374
     it, since it provides filename completion. Otherwise, we have
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   375
     to live with the dumb (default) field ...
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   376
    "
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   377
    FilenameEditField notNil ifTrue:[
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   378
        ^ FilenameEditField new.
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   379
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   380
    ^ super createEnterField
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   381
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   382
    "Modified: 18.4.1996 / 20:02:24 / cg"
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   383
!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   384
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   385
focusSequence
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   386
    patternField shown ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   387
	^ Array 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   388
	    with:patternField 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   389
	    with:enterField 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   390
	    with:selectionList 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   391
	    with:abortButton
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   392
	    with:okButton 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   393
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   394
    ^ super focusSequence
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   395
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   396
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   397
initialize
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   398
    |corner|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   399
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   400
    super initialize.
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   401
    selectingDirectory := false.
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   402
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   403
    label := resources string:'File dialog'.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   404
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   405
    labelField extent:(0.7 @ labelField height).
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   406
    labelField label:(resources string:'select a file:').
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   407
    labelField adjust:#left.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   408
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   409
    patternField := EditField in:self.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   410
    self is3D ifTrue:[
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   411
        corner := (1.0 @ (labelField origin y+patternField heightIncludingBorder)).
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   412
    ] ifFalse:[
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   413
        corner := [(width - ViewSpacing - (patternField borderWidth * 2)) @ (labelField origin y+patternField height"IncludingBorder")].
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   414
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   415
    patternField origin:(0.7 @ labelField origin y) corner:corner.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   416
    patternField rightInset:ViewSpacing.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   417
    patternField initialText:'*'.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   418
    patternField leaveAction:[:reason | 
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   419
        selectionList pattern:patternField contents. 
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   420
        self updateList
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   421
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   422
    patternField hiddenOnRealize:true. "delay showing, until a pattern is defined"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   423
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   424
    enterField addDependent:self.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   425
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   426
    "
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   427
     FileSelectionBox open
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   428
     FileSelectionBox new show
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   429
    "
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   430
!
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   431
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   432
realize
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   433
    "if some default is present in the enterField,
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   434
     scroll to make this one visible"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   435
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   436
    |contents|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   437
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   438
    super realize.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   439
    (contents := enterField contents) notNil ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   440
	contents notEmpty ifTrue:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   441
	    selectionList makeVisible:contents
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   442
	]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   443
    ]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   444
! !
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   445
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   446
!FileSelectionBox methodsFor:'private'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   447
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   448
updateList
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   449
    selectionList updateList
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   450
! !
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   451
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   452
!FileSelectionBox methodsFor:'queries'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   453
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   454
preferredExtent
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   455
    "return my preferred extent - thats the minimum size 
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   456
     to make everything visible"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   457
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   458
    |wWanted hWanted mm|
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   459
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   460
    mm := ViewSpacing.
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   461
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   462
    wWanted := mm + 
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   463
               labelField preferredExtent x + 
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   464
               (mm * 2) + 
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   465
               patternField preferredExtent x + 
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   466
               mm.
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   467
    (wWanted < width) ifTrue:[
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   468
        wWanted := width
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   469
    ].
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   470
    hWanted := mm + labelField height +
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   471
               mm + enterField height +
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   472
               mm + selectionList height +
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   473
               mm + buttonPanel preferredExtent y +
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   474
               mm.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   475
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   476
    (hWanted < height) ifTrue:[
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   477
        hWanted := height
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   478
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   479
    ^ (wWanted @ hWanted)
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   480
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   481
    "Modified: 19.4.1996 / 14:34:47 / cg"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   482
! !
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   483
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   484
!FileSelectionBox methodsFor:'user actions'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   485
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   486
directoryChanged
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   487
    selectingDirectory ifTrue:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   488
        selectionList changeDirectory.
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   489
        enterField contents:(selectionList directory pathName).
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   490
        selectionList selection:nil.
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   491
    ].
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   492
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   493
    "Created: 18.4.1996 / 18:38:21 / cg"
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   494
    "Modified: 18.4.1996 / 18:47:34 / cg"
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   495
!
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   496
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   497
directorySelected
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   498
    selectingDirectory ifTrue:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   499
        enterField contents:(selectionList directory pathName
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   500
                             , '/' , selectionList selectionValue).
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   501
    ].
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   502
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   503
    "Modified: 18.4.1996 / 18:40:41 / cg"
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   504
    "Created: 18.4.1996 / 18:46:15 / cg"
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   505
!
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   506
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   507
doubleClick
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   508
    |entry|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   509
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   510
    entry := selectionList selectionValue.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   511
    entry notNil ifTrue:[
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   512
        ((selectionList directory typeOf:entry) == #directory) ifFalse:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   513
            selectingDirectory ifFalse:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   514
                enterField contents:entry.
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   515
                self okPressed
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   516
            ]
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   517
        ]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   518
    ].
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   519
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   520
    "Modified: 18.4.1996 / 18:33:14 / cg"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   521
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   522
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   523
okPressed
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   524
    "called for both on ok-press and on return-key"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   525
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   526
    |dir string fname|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   527
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   528
    string := enterField contents.
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   529
    (string notNil and:[string notEmpty]) ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   530
        string := string withoutSeparators.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   531
        string asFilename isAbsolute ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   532
            fname := string asFilename
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   533
        ] ifFalse:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   534
            dir := selectionList directory pathName asFilename.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   535
            fname := dir construct:string
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   536
        ].
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   537
        fname isDirectory ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   538
            selectingDirectory ifFalse:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   539
                selectionList directory:fname asString.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   540
                self updateList.
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   541
                ^ self
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   542
            ]    
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   543
        ]
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   544
    ] ifFalse:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   545
        selectingDirectory ifTrue:[
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   546
            enterField contents:(selectionList directory pathName).
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   547
        ].
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   548
    ].
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   549
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   550
    super okPressed
351
24a527f86c7b allow multiple patterns sep'd by semi
ca
parents: 296
diff changeset
   551
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   552
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   553
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   554
selectionChanged
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   555
    |entry|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   556
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   557
    entry := selectionList selectionValue.
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   558
    ((selectionList directory typeOf:entry) == #directory) ifFalse:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   559
        selectingDirectory ifTrue:[
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   560
            enterField contents:(selectionList directory pathName).
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   561
            selectionList selection:nil.
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   562
            ^ self
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   563
        ]
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   564
    ].
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   565
    enterField contents:entry
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   566
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   567
    "Modified: 18.4.1996 / 18:34:57 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   568
! !
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   569
240
75a3b67bd91d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 238
diff changeset
   570
!FileSelectionBox class methodsFor:'documentation'!
75a3b67bd91d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 238
diff changeset
   571
75a3b67bd91d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 238
diff changeset
   572
version
548
c418699a90c0 moved all request methods (class protocol) to DialogBox
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   573
    ^ '$Header: /cvs/stx/stx/libwidg/Attic/FSelBox.st,v 1.30 1996-04-19 12:35:26 cg Exp $'
240
75a3b67bd91d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 238
diff changeset
   574
! !