author | Claus Gittinger <cg@exept.de> |
Fri, 27 Feb 2015 16:31:27 +0100 | |
changeset 4721 | e3cb03ac761a |
parent 4708 | adabb83e93bf |
child 4797 | b145bd0e466d |
permissions | -rw-r--r-- |
4721
e3cb03ac761a
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4708
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
e3cb03ac761a
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4708
diff
changeset
|
2 |
|
3318 | 3 |
" |
4 |
COPYRIGHT (c) 2007 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
3251 | 14 |
"{ Package: 'stx:libwidg2' }" |
15 |
||
4708
adabb83e93bf
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4330
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
adabb83e93bf
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4330
diff
changeset
|
17 |
|
3251 | 18 |
SimpleView subclass:#FilenameWidgetWithHistory |
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
19 |
instanceVariableNames:'fileNameEntryField browseButton history directoriesOnly filesOnly |
3959 | 20 |
dialogTitle initialDirectoryHolder baseDirectory' |
3251 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
23 |
category:'Views-Interactors' |
|
24 |
! |
|
25 |
||
26 |
!FilenameWidgetWithHistory class methodsFor:'documentation'! |
|
27 |
||
3318 | 28 |
copyright |
29 |
" |
|
30 |
COPYRIGHT (c) 2007 by eXept Software AG |
|
31 |
All Rights Reserved |
|
32 |
||
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
! |
|
41 |
||
3471 | 42 |
documentation |
43 |
" |
|
44 |
A Filename InputField with history-list and a browse-button, which opens a file dialog. |
|
45 |
||
46 |
[author:] |
|
47 |
Claus Gittinger |
|
48 |
||
49 |
[see also:] |
|
50 |
ComboBoxView |
|
51 |
FilenameEditField |
|
52 |
FilenameComboBoxView |
|
53 |
" |
|
54 |
! |
|
55 |
||
3251 | 56 |
examples |
57 |
" |
|
58 |
[exBegin] |
|
59 |
|top b| |
|
60 |
||
61 |
top := StandardSystemView new. |
|
62 |
top extent:(300 @ 200). |
|
63 |
||
64 |
b := FilenameWidgetWithHistory in:top. |
|
65 |
b origin:(0.0 @ 0.0) corner:(1.0 @ 0.0). |
|
66 |
b bottomInset:(b preferredExtent y negated). |
|
67 |
||
68 |
top open. |
|
69 |
[exEnd] |
|
70 |
" |
|
71 |
! ! |
|
72 |
||
73 |
!FilenameWidgetWithHistory methodsFor:'accessing'! |
|
74 |
||
3950 | 75 |
acceptOnExpand:aBoolean |
76 |
fileNameEntryField acceptOnExpand:aBoolean |
|
77 |
||
78 |
"Created: / 20-10-2010 / 17:49:54 / cg" |
|
79 |
! |
|
80 |
||
3959 | 81 |
baseDirectory |
82 |
^ baseDirectory |
|
83 |
! |
|
84 |
||
85 |
baseDirectory:something |
|
86 |
baseDirectory := something. |
|
87 |
! |
|
88 |
||
3950 | 89 |
contents |
90 |
^ fileNameEntryField contents |
|
91 |
||
92 |
"Created: / 20-10-2010 / 17:51:07 / cg" |
|
93 |
! |
|
94 |
||
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
95 |
dialogTitle:something |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
96 |
"set the dialogs title" |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
97 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
98 |
dialogTitle := something. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
99 |
! |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
100 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
101 |
directoriesOnly:aBoolean |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
102 |
"if true, directories are selectable only. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
103 |
If both filesOnly and directoriesOnly are false, which is the default, |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
104 |
anything is selectable." |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
105 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
106 |
directoriesOnly := aBoolean. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
107 |
directoriesOnly ifTrue:[ |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
108 |
filesOnly := false. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
109 |
]. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
110 |
fileNameEntryField notNil ifTrue:[ |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
111 |
fileNameEntryField directoriesOnly:aBoolean |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
112 |
]. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
113 |
! |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
114 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
115 |
filesOnly:aBoolean |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
116 |
"if true, files are selectable only. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
117 |
If both filesOnly and directoriesOnly are false, which is the default, |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
118 |
anything is selectable." |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
119 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
120 |
filesOnly := aBoolean. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
121 |
filesOnly ifTrue:[ |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
122 |
directoriesOnly := false. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
123 |
]. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
124 |
fileNameEntryField notNil ifTrue:[ |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
125 |
fileNameEntryField filesOnly:aBoolean |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
126 |
]. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
127 |
! |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
128 |
|
3251 | 129 |
historyList |
3474 | 130 |
history isNil ifTrue:[ |
4708
adabb83e93bf
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4330
diff
changeset
|
131 |
history := ValueHolder with:nil |
3474 | 132 |
]. |
133 |
^ history |
|
3251 | 134 |
! |
135 |
||
3593 | 136 |
historyList:aList |
137 |
"set the history - useful when two or more such fields shall share a common history" |
|
138 |
||
139 |
history := aList |
|
140 |
! |
|
141 |
||
3594 | 142 |
initialDirectoryHolder |
143 |
"can be used to force the file-dialog into some initial directory" |
|
144 |
||
145 |
^ initialDirectoryHolder |
|
146 |
! |
|
147 |
||
3251 | 148 |
model |
149 |
^ fileNameEntryField model |
|
150 |
! |
|
151 |
||
152 |
model:aFilenameHolder |
|
153 |
fileNameEntryField model:aFilenameHolder. |
|
3950 | 154 |
! |
155 |
||
156 |
selectAllInitially |
|
157 |
fileNameEntryField selectAllInitially |
|
158 |
||
159 |
"Created: / 20-10-2010 / 17:50:23 / cg" |
|
3251 | 160 |
! ! |
161 |
||
3546 | 162 |
!FilenameWidgetWithHistory methodsFor:'accessing-channels'! |
163 |
||
164 |
enableChannel:aValueHolder |
|
165 |
fileNameEntryField enableChannel:aValueHolder. |
|
166 |
browseButton enableChannel:aValueHolder. |
|
4084 | 167 |
! |
168 |
||
169 |
modifiedChannel:aValueHolder |
|
170 |
fileNameEntryField modifiedChannel:aValueHolder. |
|
171 |
||
172 |
"Created: / 05-10-2011 / 14:59:48 / cg" |
|
3546 | 173 |
! ! |
174 |
||
175 |
!FilenameWidgetWithHistory methodsFor:'accessing-editField attributes'! |
|
3472 | 176 |
|
177 |
acceptIfUnchanged:aBoolean |
|
178 |
fileNameEntryField acceptIfUnchanged:aBoolean |
|
179 |
! |
|
180 |
||
181 |
acceptOnLeave:aBoolean |
|
182 |
fileNameEntryField acceptOnLeave:aBoolean |
|
183 |
! |
|
184 |
||
185 |
acceptOnLostFocus:aBoolean |
|
186 |
fileNameEntryField acceptOnLostFocus:aBoolean |
|
187 |
! |
|
188 |
||
189 |
acceptOnPointerLeave:aBoolean |
|
190 |
fileNameEntryField acceptOnPointerLeave:aBoolean |
|
191 |
! |
|
192 |
||
193 |
acceptOnReturn:aBoolean |
|
194 |
fileNameEntryField acceptOnReturn:aBoolean |
|
195 |
! |
|
196 |
||
197 |
acceptOnTab:aBoolean |
|
198 |
fileNameEntryField acceptOnTab:aBoolean |
|
199 |
! |
|
200 |
||
201 |
contents:aString |
|
202 |
fileNameEntryField contents:aString |
|
203 |
! |
|
204 |
||
205 |
immediateAccept:aBoolean |
|
206 |
fileNameEntryField immediateAccept:aBoolean |
|
207 |
! |
|
208 |
||
209 |
maxChars:aBoolean |
|
210 |
fileNameEntryField maxChars:aBoolean |
|
211 |
! |
|
212 |
||
213 |
readOnly:aBoolean |
|
214 |
fileNameEntryField readOnly:aBoolean |
|
215 |
! ! |
|
216 |
||
3251 | 217 |
!FilenameWidgetWithHistory methodsFor:'initialization'! |
218 |
||
219 |
initialize |
|
220 |
super initialize. |
|
221 |
||
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
222 |
directoriesOnly := filesOnly := false. |
4708
adabb83e93bf
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4330
diff
changeset
|
223 |
initialDirectoryHolder := ValueHolder with:nil. |
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
224 |
|
3940
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
225 |
self initializeFilenameField. |
3251 | 226 |
fileNameEntryField layout:(LayoutFrame |
227 |
leftFraction:0 offset:0 |
|
228 |
rightFraction:1 offset:-22 |
|
229 |
topFraction:0 offset:0 |
|
230 |
bottomFraction:1 offset:0). |
|
231 |
||
3959 | 232 |
self initializeBrowseButton. |
3251 | 233 |
browseButton layout:(LayoutFrame |
234 |
leftFraction:1 offset:-22 |
|
235 |
rightFraction:1 offset:-2 |
|
236 |
topFraction:0 offset:0 |
|
237 |
bottomFraction:1 offset:0). |
|
3940
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
238 |
|
3959 | 239 |
"Modified: / 02-11-2010 / 19:50:33 / cg" |
240 |
! |
|
241 |
||
242 |
initializeBrowseButton |
|
243 |
browseButton := Button in:self. |
|
244 |
browseButton label:'...'. |
|
245 |
browseButton action:[ self browseForFileOrDirectory ]. |
|
246 |
||
247 |
"Created: / 02-11-2010 / 19:50:21 / cg" |
|
3940
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
248 |
! |
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
249 |
|
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
250 |
initializeFilenameField |
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
251 |
fileNameEntryField := FilenameComboBoxView in:self. |
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
252 |
fileNameEntryField listHolder:(self historyList). |
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
253 |
|
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
254 |
"Created: / 19-10-2010 / 16:20:09 / cg" |
3251 | 255 |
! ! |
256 |
||
257 |
!FilenameWidgetWithHistory methodsFor:'queries'! |
|
258 |
||
259 |
preferredExtent |
|
3568
2f293d1e2eef
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
260 |
"/ If I have an explicit preferredExtent.. |
2f293d1e2eef
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
261 |
explicitExtent notNil ifTrue:[ |
2f293d1e2eef
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
262 |
^ explicitExtent |
2f293d1e2eef
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
263 |
]. |
2f293d1e2eef
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
264 |
"/ If I have a cached preferredExtent value.. |
3251 | 265 |
preferredExtent notNil ifTrue:[ |
266 |
^ preferredExtent |
|
267 |
]. |
|
268 |
||
3427
9927e4970fce
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3318
diff
changeset
|
269 |
preferredExtent := (fileNameEntryField preferredWidth + browseButton preferredWidth) |
3251 | 270 |
@ |
3427
9927e4970fce
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3318
diff
changeset
|
271 |
(fileNameEntryField preferredHeight "max: browseButton preferredExtent y"). |
3251 | 272 |
^ preferredExtent |
273 |
! ! |
|
274 |
||
275 |
!FilenameWidgetWithHistory methodsFor:'user actions'! |
|
276 |
||
277 |
browseForDestinationDirectory |
|
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
278 |
<resource: #obsolete> |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
279 |
self obsoleteMethodWarning. |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
280 |
self browseForFileOrDirectory |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
281 |
! |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
282 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
283 |
browseForFileOrDirectory |
3594 | 284 |
|path | |
3251 | 285 |
|
4721
e3cb03ac761a
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4708
diff
changeset
|
286 |
Dialog modifyingBoxWith:[:box | |
e3cb03ac761a
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4708
diff
changeset
|
287 |
box perform:#browsemenuItemVisibleHolder: with:true ifNotUnderstood:[]. |
3251 | 288 |
] do:[ |
3594 | 289 |
|title defaultPath defaultDir| |
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
290 |
|
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
291 |
title := dialogTitle notNil |
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
292 |
ifTrue:[ dialogTitle ] |
3959 | 293 |
ifFalse:[ |
294 |
resources string:( |
|
295 |
directoriesOnly |
|
296 |
ifTrue:[ 'Select Directory' ] |
|
297 |
ifFalse:[ |
|
298 |
filesOnly |
|
299 |
ifTrue:[ 'Select File' ] |
|
300 |
ifFalse:[ 'Select Path' ]])]. |
|
3590
c3c778e11564
fixes (thanx to bretts info)
Claus Gittinger <cg@exept.de>
parents:
3568
diff
changeset
|
301 |
|
3950 | 302 |
defaultPath := (self model notNil) |
303 |
ifTrue:[ self model value ] |
|
304 |
ifFalse:[ fileNameEntryField contents ]. |
|
3959 | 305 |
|
4019
33b8c1b762cb
changed: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3959
diff
changeset
|
306 |
defaultPath notEmptyOrNil ifTrue:[ |
33b8c1b762cb
changed: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3959
diff
changeset
|
307 |
defaultPath asFilename isAbsolute ifFalse:[ |
33b8c1b762cb
changed: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3959
diff
changeset
|
308 |
baseDirectory notNil ifTrue:[ |
33b8c1b762cb
changed: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3959
diff
changeset
|
309 |
defaultPath := baseDirectory asFilename construct:defaultPath. |
33b8c1b762cb
changed: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3959
diff
changeset
|
310 |
]. |
3959 | 311 |
]. |
3594 | 312 |
defaultDir := defaultPath asFilename directory. |
313 |
] ifFalse:[ |
|
314 |
defaultDir := initialDirectoryHolder value. |
|
315 |
]. |
|
316 |
path := Dialog |
|
3954
e28b5c4fe0c9
comment/format in: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3953
diff
changeset
|
317 |
requestFileName:title |
e28b5c4fe0c9
comment/format in: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3953
diff
changeset
|
318 |
default:defaultPath |
e28b5c4fe0c9
comment/format in: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3953
diff
changeset
|
319 |
fromDirectory:defaultDir. |
3251 | 320 |
]. |
3594 | 321 |
path isEmptyOrNil ifTrue:[ ^ self ]. |
3953
370687d1030b
changed: #browseForFileOrDirectory
Stefan Vogel <sv@exept.de>
parents:
3950
diff
changeset
|
322 |
path := path asFilename. |
3251 | 323 |
|
3959 | 324 |
baseDirectory notNil ifTrue:[ |
325 |
(path pathName startsWith:baseDirectory asFilename pathName) ifTrue:[ |
|
326 |
path := (path pathName copyFrom:(baseDirectory asFilename pathName size + 2)) asFilename. |
|
327 |
]. |
|
328 |
]. |
|
329 |
||
3953
370687d1030b
changed: #browseForFileOrDirectory
Stefan Vogel <sv@exept.de>
parents:
3950
diff
changeset
|
330 |
initialDirectoryHolder value:path directory. |
370687d1030b
changed: #browseForFileOrDirectory
Stefan Vogel <sv@exept.de>
parents:
3950
diff
changeset
|
331 |
path := path pathName. |
370687d1030b
changed: #browseForFileOrDirectory
Stefan Vogel <sv@exept.de>
parents:
3950
diff
changeset
|
332 |
|
3594 | 333 |
"/ lastDirectoryHolder value:path directory. |
3950 | 334 |
self model notNil ifTrue:[ |
335 |
self model value:path. |
|
336 |
]. |
|
337 |
fileNameEntryField contents:path. |
|
3251 | 338 |
|
4019
33b8c1b762cb
changed: #browseForFileOrDirectory
Claus Gittinger <cg@exept.de>
parents:
3959
diff
changeset
|
339 |
"Modified: / 08-02-2011 / 09:24:51 / cg" |
3251 | 340 |
! ! |
341 |
||
342 |
!FilenameWidgetWithHistory class methodsFor:'documentation'! |
|
343 |
||
344 |
version |
|
4721
e3cb03ac761a
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4708
diff
changeset
|
345 |
^ '$Header: /cvs/stx/stx/libwidg2/FilenameWidgetWithHistory.st,v 1.23 2015-02-27 15:31:27 cg Exp $' |
3940
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
346 |
! |
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
347 |
|
705b77e37f67
added: #initializeFilenameField
Claus Gittinger <cg@exept.de>
parents:
3700
diff
changeset
|
348 |
version_CVS |
4721
e3cb03ac761a
class: FilenameWidgetWithHistory
Claus Gittinger <cg@exept.de>
parents:
4708
diff
changeset
|
349 |
^ '$Header: /cvs/stx/stx/libwidg2/FilenameWidgetWithHistory.st,v 1.23 2015-02-27 15:31:27 cg Exp $' |
3251 | 350 |
! ! |
4330
69a2cba2229e
aboutToOpenBoxNotificationSignal semantic change (for Jan)
Claus Gittinger <cg@exept.de>
parents:
4084
diff
changeset
|
351 |