18
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
43
|
3 |
All Rights Reserved
|
18
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
3589
|
12 |
"{ Package: 'stx:libwidg2' }"
|
566
|
13 |
|
18
|
14 |
EnterBox subclass:#FilenameEnterBox
|
151
|
15 |
instanceVariableNames:''
|
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
category:'Views-DialogBoxes'
|
18
|
19 |
!
|
|
20 |
|
|
21 |
!FilenameEnterBox class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
43
|
26 |
All Rights Reserved
|
18
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
|
35 |
!
|
|
36 |
|
|
37 |
documentation
|
|
38 |
"
|
3589
|
39 |
like a normal enterBox, but does filename-completion when TAB is pressed.
|
|
40 |
|
|
41 |
[warning:]
|
|
42 |
This is too-simple a dialog, and has been obsoleted by a much better Dialog
|
|
43 |
with tree-like file selection.
|
|
44 |
Please use
|
|
45 |
Dialog requestFileName:'...'
|
|
46 |
or:
|
|
47 |
Dialog requestDirectoryName:'...'
|
|
48 |
instead.
|
154
|
49 |
|
|
50 |
[author:]
|
|
51 |
Claus Gittinger
|
182
|
52 |
|
|
53 |
[see also:]
|
|
54 |
EnterBox FileSelectionBox FileSaveBox
|
3589
|
55 |
DialogBox Dialog
|
18
|
56 |
"
|
566
|
57 |
!
|
|
58 |
|
|
59 |
examples
|
|
60 |
"
|
|
61 |
examples (for ST-80 compatibility, please use Dialog messages):
|
|
62 |
|
|
63 |
simple (most common):
|
|
64 |
[exBegin]
|
|
65 |
|someString|
|
|
66 |
|
|
67 |
someString := FilenameEnterBox request:'enter a filename:'.
|
|
68 |
Transcript showCR:someString
|
|
69 |
[exEnd]
|
|
70 |
"
|
96
|
71 |
! !
|
|
72 |
|
|
73 |
!FilenameEnterBox methodsFor:'accessing'!
|
|
74 |
|
|
75 |
directoriesOnly
|
3645
|
76 |
<resource: #obsolete>
|
96
|
77 |
"set to expand names for directories only"
|
|
78 |
|
3589
|
79 |
self obsoleteMethodWarning.
|
96
|
80 |
enterField directoriesOnly
|
|
81 |
!
|
|
82 |
|
3589
|
83 |
directoriesOnly:aBoolean
|
|
84 |
"set/clear for directories only"
|
|
85 |
|
|
86 |
enterField directoriesOnly:aBoolean
|
|
87 |
!
|
|
88 |
|
96
|
89 |
directory:aFilename
|
|
90 |
"set the directory"
|
|
91 |
|
|
92 |
enterField directory:aFilename
|
|
93 |
|
|
94 |
"Modified: 7.9.1995 / 10:33:00 / claus"
|
|
95 |
!
|
|
96 |
|
|
97 |
filesOnly
|
3645
|
98 |
<resource: #obsolete>
|
96
|
99 |
"set to expand names for files only"
|
|
100 |
|
3589
|
101 |
self obsoleteMethodWarning.
|
96
|
102 |
enterField filesOnly
|
3589
|
103 |
!
|
|
104 |
|
|
105 |
filesOnly:aBoolean
|
|
106 |
"set/clear for files only"
|
|
107 |
|
|
108 |
enterField filesOnly:aBoolean
|
18
|
109 |
! !
|
|
110 |
|
|
111 |
!FilenameEnterBox methodsFor:'initialization'!
|
|
112 |
|
|
113 |
createEnterField
|
51
|
114 |
"redefined, since we need an editfield for filenames here
|
151
|
115 |
(if the class has not been compiled in, use a dumb default field)"
|
18
|
116 |
|
51
|
117 |
FilenameEditField notNil ifTrue:[
|
151
|
118 |
^ FilenameEditField new.
|
51
|
119 |
].
|
|
120 |
^ super createEnterField
|
151
|
121 |
|
|
122 |
"Modified: 18.4.1996 / 20:01:15 / cg"
|
18
|
123 |
! !
|
|
124 |
|
106
|
125 |
!FilenameEnterBox class methodsFor:'documentation'!
|
|
126 |
|
|
127 |
version
|
3645
|
128 |
^ '$Header: /cvs/stx/stx/libwidg2/FilenameEnterBox.st,v 1.15 2009-02-26 21:30:12 stefan Exp $'
|
106
|
129 |
! !
|