author | penk |
Thu, 27 Feb 2003 18:15:06 +0100 | |
changeset 4627 | 856a643c7854 |
parent 4603 | 49cca8deebde |
child 4666 | 2775d69bc8be |
permissions | -rw-r--r-- |
3892 | 1 |
"{ Package: 'stx:libtool' }" |
2 |
||
3 |
SimpleDialog subclass:#FileDialog |
|
4 |
instanceVariableNames:'aspects treeBrowser enableBack enableDirectoryUp enableForward |
|
5 |
enableHome directory pattern filterHolder initialText |
|
3953 | 6 |
doubleClickAction cancelLabelHolder okLabelHolder startFilename |
3956 | 7 |
result filterField filenameField viewFiles filenameLabelHolder |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
8 |
asLoadDialog newDirectoryVisibilityHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
9 |
appendButtonVisibleHolder multipleSelect appendWasPressed' |
3892 | 10 |
classVariableNames:'LastFileSelectionDirectory' |
11 |
poolDictionaries:'' |
|
12 |
category:'Interface-Tools-File' |
|
13 |
! |
|
14 |
||
15 |
!FileDialog class methodsFor:'documentation'! |
|
16 |
||
17 |
documentation |
|
18 |
" |
|
19 |
documentation to be added. |
|
20 |
||
21 |
[author:] |
|
22 |
Martin Walser (martin@vercingetorix) |
|
23 |
||
24 |
[instance variables:] |
|
25 |
||
26 |
[class variables:] |
|
27 |
||
28 |
[see also:] |
|
29 |
||
30 |
" |
|
31 |
! |
|
32 |
||
33 |
examples |
|
34 |
" |
|
35 |
Starting the application: |
|
36 |
[exBegin] |
|
37 |
FileDialog open |
|
38 |
||
39 |
[exEnd] |
|
40 |
||
41 |
more examples to be added: |
|
42 |
[exBegin] |
|
43 |
... add code fragment for |
|
44 |
... executable example here ... |
|
45 |
[exEnd] |
|
46 |
" |
|
47 |
! |
|
48 |
||
49 |
history |
|
50 |
"Created: / 19.9.2002 / 13:05:28 / martin" |
|
51 |
! ! |
|
52 |
||
53 |
!FileDialog class methodsFor:'instance creation'! |
|
54 |
||
55 |
requestDirectoryName:title default:aFileName ifFail:failBlock |
|
56 |
"same as requestFileName, but only show directories" |
|
57 |
||
58 |
^ self requestDirectoryName:title |
|
59 |
default:aFileName |
|
60 |
ok:nil |
|
61 |
abort:nil |
|
62 |
version:nil |
|
63 |
pattern:nil |
|
64 |
fromDirectory:nil |
|
65 |
ifFail:failBlock |
|
3956 | 66 |
whenBoxCreatedEvaluate:nil |
67 |
asLoadDialog:nil. |
|
3892 | 68 |
|
69 |
" |
|
3904 | 70 |
FileDialog |
3892 | 71 |
requestDirectoryName:'which directory ?' |
4627 | 72 |
default:Filename currentDirectory pathName |
3892 | 73 |
ifFail:'none' |
74 |
" |
|
75 |
! |
|
76 |
||
3956 | 77 |
requestDirectoryName:titleString default:aFileName ok:okText abort:abortText version:versionSymbol pattern:pattern fromDirectory:aDirectoryPath ifFail:failBlock whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean |
3892 | 78 |
"same as requestFileName, but only show directories" |
79 |
||
3956 | 80 |
|enteredFileName instance enteredFileNameString| |
3892 | 81 |
|
3956 | 82 |
instance := self startApplicationFor:titleString |
83 |
default:aFileName |
|
84 |
ok:okText |
|
85 |
abort:abortText |
|
86 |
ifFail:failBlock |
|
87 |
pattern:pattern |
|
88 |
fromDirectory:aDirectoryPath |
|
89 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
90 |
asLoadDialog:aBoolean |
|
3958 | 91 |
forDirectory:true |
92 |
multipleSelect:false. |
|
3892 | 93 |
|
94 |
enteredFileNameString := instance result. |
|
95 |
enteredFileNameString isNil ifTrue:[ |
|
96 |
^ failBlock value |
|
97 |
]. |
|
98 |
enteredFileName := enteredFileNameString asFilename. |
|
99 |
enteredFileNameString := enteredFileName asString. |
|
100 |
(enteredFileName notNil |
|
101 |
and:[enteredFileNameString notEmpty]) ifTrue:[ |
|
102 |
versionSymbol isNil ifTrue:[ ^ enteredFileNameString]. |
|
103 |
versionSymbol == #mustBeNew ifTrue:[ |
|
104 |
"/ file may not exist |
|
105 |
enteredFileName exists ifTrue:[^ '']. |
|
106 |
]. |
|
107 |
versionSymbol == #new ifTrue:[ |
|
108 |
"/ file may not exist |
|
109 |
enteredFileName exists ifTrue:[ |
|
110 |
(Dialog confirm:(self classResources string:'''%1'' exists.\\Continue anyway ?' with:enteredFileNameString) withCRs) |
|
111 |
ifFalse:[^ '']. |
|
112 |
]. |
|
113 |
]. |
|
114 |
versionSymbol == #mustBeOld ifTrue:[ |
|
115 |
enteredFileName exists ifFalse:[^ '']. |
|
116 |
]. |
|
117 |
versionSymbol == #old ifTrue:[ |
|
118 |
"/ file may not exist |
|
119 |
enteredFileName exists ifFalse:[ |
|
120 |
(self confirm:(self classResources string:'''%1'' does not exist yet.\\Continue anyway ?' with:enteredFileNameString) withCRs) |
|
121 |
ifFalse:[^ '']. |
|
122 |
]. |
|
123 |
]. |
|
124 |
FileSelectionBox lastFileSelectionDirectory:(enteredFileNameString). |
|
125 |
]. |
|
126 |
^ enteredFileNameString |
|
127 |
||
128 |
" |
|
129 |
FileDialog |
|
130 |
requestDirectoryName:'which directory ?' |
|
4627 | 131 |
default:Filename currentDirectory pathName |
3892 | 132 |
ifFail:nil |
133 |
" |
|
3956 | 134 |
" |
135 |
FileDialog |
|
136 |
requestDirectoryName:'which directory ?' |
|
4627 | 137 |
default:Filename currentDirectory pathName |
3956 | 138 |
ok:nil |
139 |
abort:nil |
|
140 |
version:nil |
|
141 |
pattern:nil |
|
142 |
fromDirectory:nil |
|
143 |
ifFail:nil |
|
144 |
whenBoxCreatedEvaluate:nil |
|
145 |
asLoadDialog:true |
|
146 |
" |
|
3892 | 147 |
! |
148 |
||
149 |
requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback |
|
150 |
||
151 |
^ self requestFileName:titleString |
|
152 |
default:defaultName |
|
153 |
ok:okText |
|
154 |
abort:abortText |
|
155 |
version:nil |
|
156 |
ifFail:nil |
|
157 |
pattern:pattern |
|
158 |
fromDirectory:aDirectoryPathOrNil |
|
159 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
160 |
! |
|
161 |
||
162 |
requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback |
|
163 |
"launch a Dialog, which allows user to enter a filename. |
|
164 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
165 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
166 |
The box will show okText in its okButton, abortText in the abortButton. |
|
167 |
The matchPattern is set to pattern initially. |
|
168 |
Return the string, or nil if cancel was pressed |
|
169 |
The version argument allows validation of the files existance; |
|
170 |
it may be any of: |
|
171 |
#mustBeNew - fail (return empty string) if the file exists |
|
172 |
#new - confirm if the file exists |
|
173 |
#mustBeOld - fail if the file does not exist |
|
174 |
#old - confirm if the file does not exist |
|
175 |
#any (other) - no validation |
|
176 |
" |
|
177 |
||
3960 | 178 |
^ self requestFileName:titleString |
3956 | 179 |
default:defaultName |
180 |
ok:okText |
|
181 |
abort:abortText |
|
182 |
version:versionSymbol |
|
183 |
ifFail:failBlock |
|
184 |
pattern:pattern |
|
185 |
fromDirectory:aDirectoryPath |
|
186 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
187 |
asLoadDialog:nil |
|
188 |
! |
|
189 |
||
190 |
requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean |
|
191 |
"launch a Dialog, which allows user to enter a filename. |
|
192 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
193 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
194 |
The box will show okText in its okButton, abortText in the abortButton. |
|
195 |
The matchPattern is set to pattern initially. |
|
196 |
Return the string, or nil if cancel was pressed |
|
197 |
The version argument allows validation of the files existance; |
|
198 |
it may be any of: |
|
199 |
#mustBeNew - fail (return empty string) if the file exists |
|
200 |
#new - confirm if the file exists |
|
201 |
#mustBeOld - fail if the file does not exist |
|
202 |
#old - confirm if the file does not exist |
|
203 |
#any (other) - no validation |
|
204 |
" |
|
205 |
||
3892 | 206 |
|
3904 | 207 |
| instance enteredFileName enteredFileNameString| |
3892 | 208 |
|
3904 | 209 |
instance := self startApplicationFor:titleString |
210 |
default:defaultName |
|
211 |
ok:okText |
|
212 |
abort:abortText |
|
213 |
ifFail:failBlock |
|
214 |
pattern:pattern |
|
215 |
fromDirectory:aDirectoryPath |
|
3956 | 216 |
whenBoxCreatedEvaluate:boxCreatedCallback |
217 |
asLoadDialog:aBoolean |
|
3958 | 218 |
forDirectory:false |
219 |
multipleSelect:false. |
|
3892 | 220 |
|
221 |
enteredFileNameString := instance result. |
|
3938 | 222 |
(enteredFileNameString isNil or:[enteredFileNameString isEmpty]) ifTrue:[ |
3892 | 223 |
^ failBlock value |
224 |
]. |
|
225 |
enteredFileName := enteredFileNameString asFilename. |
|
226 |
enteredFileNameString := enteredFileName asString. |
|
227 |
(enteredFileName notNil |
|
228 |
and:[enteredFileNameString notEmpty]) ifTrue:[ |
|
229 |
versionSymbol isNil ifTrue:[ ^ enteredFileNameString]. |
|
230 |
versionSymbol == #mustBeNew ifTrue:[ |
|
231 |
"/ file may not exist |
|
232 |
enteredFileName exists ifTrue:[^ '']. |
|
233 |
]. |
|
234 |
versionSymbol == #new ifTrue:[ |
|
235 |
"/ file may not exist |
|
236 |
enteredFileName exists ifTrue:[ |
|
237 |
(Dialog confirm:(self classResources string:'''%1'' exists.\\Continue anyway ?' with:enteredFileNameString) withCRs) |
|
238 |
ifFalse:[^ '']. |
|
239 |
]. |
|
240 |
]. |
|
241 |
versionSymbol == #mustBeOld ifTrue:[ |
|
242 |
enteredFileName exists ifFalse:[^ '']. |
|
243 |
]. |
|
244 |
versionSymbol == #old ifTrue:[ |
|
245 |
"/ file may not exist |
|
246 |
enteredFileName exists ifFalse:[ |
|
247 |
(self confirm:(self classResources string:'''%1'' does not exist yet.\\Continue anyway ?' with:enteredFileNameString) withCRs) |
|
248 |
ifFalse:[^ '']. |
|
249 |
]. |
|
250 |
]. |
|
251 |
FileSelectionBox lastFileSelectionDirectory:(enteredFileName directoryName). |
|
252 |
]. |
|
253 |
^ enteredFileNameString |
|
3956 | 254 |
" |
255 |
FileDialog |
|
256 |
requestFileName:'enter a fileName:' |
|
257 |
default:'' |
|
258 |
ok:nil |
|
259 |
abort:nil |
|
260 |
version:nil |
|
261 |
ifFail:['none'] |
|
262 |
pattern:'*.conf' |
|
4627 | 263 |
fromDirectory:Filename currentDirectory pathName |
3956 | 264 |
whenBoxCreatedEvaluate:nil |
265 |
asLoadDialog:true |
|
266 |
" |
|
3892 | 267 |
! |
268 |
||
269 |
requestFileName:titleString default:defaultName version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback |
|
270 |
||
271 |
^ self requestFileName:titleString |
|
272 |
default:defaultName |
|
273 |
ok:nil |
|
274 |
abort:nil |
|
275 |
version:versionSymbol |
|
276 |
ifFail:failBlock |
|
277 |
pattern:pattern |
|
278 |
fromDirectory:aDirectoryPathOrNil |
|
279 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
280 |
||
281 |
" |
|
282 |
FileDialog |
|
283 |
requestFileName:'enter a fileName:' |
|
284 |
default:'' |
|
285 |
version:nil |
|
286 |
ifFail:['none'] |
|
287 |
pattern:'*.conf' |
|
4627 | 288 |
fromDirectory:Filename currentDirectory pathName |
3892 | 289 |
whenBoxCreatedEvaluate:nil. |
290 |
Dialog |
|
291 |
requestFileName:'enter a fileName:' |
|
292 |
default:'' |
|
293 |
version:nil |
|
294 |
ifFail:['none'] |
|
295 |
pattern:'*.conf' |
|
4627 | 296 |
fromDirectory:Filename currentDirectory pathName |
3892 | 297 |
whenBoxCreatedEvaluate:nil |
298 |
" |
|
299 |
" |
|
300 |
FileDialog |
|
301 |
requestFileName:'enter a fileName:' |
|
302 |
default:'' |
|
303 |
version:#old |
|
304 |
ifFail:['none'] |
|
305 |
pattern:'*.conf' |
|
4627 | 306 |
fromDirectory:Filename currentDirectory pathName |
3892 | 307 |
whenBoxCreatedEvaluate:nil |
308 |
" |
|
309 |
" |
|
310 |
FileDialog |
|
311 |
requestFileName:'enter a fileName:' |
|
312 |
default:'' |
|
313 |
version:#mustBeNew |
|
314 |
ifFail:['none'] |
|
315 |
pattern:'*.conf' |
|
4627 | 316 |
fromDirectory:Filename currentDirectory pathName |
3892 | 317 |
whenBoxCreatedEvaluate:nil |
318 |
" |
|
3904 | 319 |
! |
320 |
||
321 |
requestFileNames:titleString default:defaultName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback |
|
322 |
"launch a Dialog, which allows user to enter a filename. |
|
323 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
324 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
325 |
The box will show okText in its okButton, abortText in the abortButton. |
|
326 |
The matchPattern is set to pattern initially. |
|
3905 | 327 |
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed |
3904 | 328 |
" |
329 |
||
330 |
||
3956 | 331 |
^ self requestFileNames:titleString |
332 |
default:defaultName |
|
333 |
ok:okText |
|
334 |
abort:abortText |
|
335 |
ifFail:failBlock |
|
336 |
pattern:pattern |
|
337 |
fromDirectory:aDirectoryPath |
|
338 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
339 |
asLoadDialog:nil. |
|
340 |
||
341 |
||
342 |
" |
|
343 |
FileDialog |
|
344 |
requestFileNames:'enter a fileName:' |
|
345 |
default:'' |
|
346 |
ok:nil |
|
347 |
abort:nil |
|
348 |
ifFail:['none'] |
|
349 |
pattern:'*.conf' |
|
4627 | 350 |
fromDirectory:Filename currentDirectory pathName |
3956 | 351 |
whenBoxCreatedEvaluate:nil. |
352 |
" |
|
353 |
! |
|
354 |
||
355 |
requestFileNames:titleString default:defaultName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:asLoadDialog |
|
356 |
"launch a Dialog, which allows user to enter a filename. |
|
357 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
358 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
359 |
The box will show okText in its okButton, abortText in the abortButton. |
|
360 |
The matchPattern is set to pattern initially. |
|
361 |
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed |
|
362 |
" |
|
363 |
||
364 |
||
3904 | 365 |
| instance enteredFileNames lastDirectory| |
366 |
||
367 |
instance := self startApplicationFor:titleString |
|
368 |
default:defaultName |
|
369 |
ok:okText |
|
370 |
abort:abortText |
|
371 |
ifFail:failBlock |
|
372 |
pattern:pattern |
|
373 |
fromDirectory:aDirectoryPath |
|
3956 | 374 |
whenBoxCreatedEvaluate:boxCreatedCallback |
375 |
asLoadDialog:asLoadDialog |
|
3958 | 376 |
forDirectory:false |
377 |
multipleSelect:true. |
|
3904 | 378 |
|
3996 | 379 |
enteredFileNames := instance currentSelectedFiles. |
3904 | 380 |
(enteredFileNames isEmpty or:[instance result isNil]) ifTrue:[ |
381 |
^ failBlock value |
|
382 |
]. |
|
383 |
lastDirectory := enteredFileNames first. |
|
384 |
lastDirectory := lastDirectory isFilename ifTrue:[lastDirectory directory] ifFalse:[lastDirectory]. |
|
385 |
FileSelectionBox lastFileSelectionDirectory:(lastDirectory directoryName). |
|
386 |
^ enteredFileNames |
|
387 |
||
388 |
" |
|
389 |
FileDialog |
|
390 |
requestFileNames:'enter a fileName:' |
|
391 |
default:'' |
|
392 |
ok:nil |
|
393 |
abort:nil |
|
394 |
ifFail:['none'] |
|
395 |
pattern:'*.conf' |
|
4627 | 396 |
fromDirectory:Filename currentDirectory pathName |
3956 | 397 |
whenBoxCreatedEvaluate:nil |
398 |
asLoadDialog:true. |
|
3904 | 399 |
" |
400 |
! |
|
401 |
||
3958 | 402 |
startApplicationFor:titleString default:aFileName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:asLoadDialog forDirectory:forDirectory multipleSelect:multipleSelect |
3904 | 403 |
"launch a Dialog, which allows user to enter a filename. |
404 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
405 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
406 |
The box will show okText in its okButton, abortText in the abortButton. |
|
407 |
The matchPattern is set to pattern initially. |
|
408 |
Return the string, or nil if cancel was pressed |
|
409 |
The version argument allows validation of the files existance; |
|
410 |
it may be any of: |
|
411 |
#mustBeNew - fail (return empty string) if the file exists |
|
412 |
#new - confirm if the file exists |
|
413 |
#mustBeOld - fail if the file does not exist |
|
414 |
#old - confirm if the file does not exist |
|
415 |
#any (other) - no validation |
|
416 |
" |
|
417 |
||
418 |
||
4539 | 419 |
| defaultDir defaultNm instance defaultFile locFilename| |
3904 | 420 |
|
4539 | 421 |
locFilename := aFileName. |
422 |
defaultNm := locFilename. |
|
3904 | 423 |
defaultDir := aDirectoryPath. |
424 |
defaultDir isNil ifTrue:[ |
|
4539 | 425 |
defaultNm notNil ifTrue:[ |
426 |
defaultDir := locFilename asFilename asAbsoluteFilename directory. |
|
3956 | 427 |
] ifFalse:[ |
428 |
defaultDir := FileSelectionBox lastFileSelectionDirectory. |
|
429 |
defaultDir isNil ifTrue:[ |
|
4539 | 430 |
defaultDir := Filename currentDirectory asAbsoluteFilename. |
3956 | 431 |
]. |
432 |
] |
|
3904 | 433 |
]. |
4206 | 434 |
defaultDir := defaultDir asFilename asAbsoluteFilename. |
3904 | 435 |
[defaultDir exists not] whileTrue:[ |
436 |
defaultDir := defaultDir directory. |
|
437 |
]. |
|
3956 | 438 |
forDirectory not ifTrue:[ |
4539 | 439 |
(locFilename notNil and:[locFilename asFilename withoutSuffix baseName ~= '*']) ifTrue:[ |
440 |
defaultFile := defaultDir construct:(locFilename asFilename baseName). |
|
3956 | 441 |
]. |
4539 | 442 |
] ifFalse:[ |
443 |
defaultFile := locFilename asFilename asAbsoluteFilename. |
|
3904 | 444 |
]. |
4562 | 445 |
defaultFile isNil ifTrue:[ |
446 |
defaultFile := defaultDir. |
|
447 |
]. |
|
3956 | 448 |
|
3904 | 449 |
instance := self new. |
450 |
defaultDir notNil ifTrue:[instance directory:(defaultDir asFilename)]. |
|
3958 | 451 |
instance multipleSelect:multipleSelect ? false. |
3904 | 452 |
instance startFilename:defaultFile. |
453 |
instance pattern:((pattern isNil or:[pattern isEmpty]) ifTrue:['*'] ifFalse:[pattern]). |
|
454 |
instance initialText:titleString. |
|
455 |
instance okLabelHolder value:okText. |
|
456 |
instance cancelLabelHolder value:abortText. |
|
3956 | 457 |
instance asLoadDialog:asLoadDialog ? false. |
458 |
instance viewFiles:(forDirectory isNil ifTrue:[true] ifFalse:[forDirectory not]). |
|
3953 | 459 |
self setDoubleClickActionFor:instance. |
3904 | 460 |
instance allButOpenInterface:#windowSpec. |
461 |
boxCreatedCallback notNil ifTrue:[boxCreatedCallback value:instance]. |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
462 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
463 |
Dialog aboutToOpenBoxNotificationSignal raiseRequestWith:instance. |
3904 | 464 |
instance openWindowModal. |
465 |
^ instance |
|
3892 | 466 |
! ! |
467 |
||
468 |
!FileDialog class methodsFor:'accessing'! |
|
469 |
||
470 |
lastFileSelectionDirectory |
|
471 |
"return the name of the directory used in the previous |
|
472 |
fileSelection dialog. This will be used as default for the next dialog, |
|
473 |
if no explicit path is specified (see requestFileName:* methods)" |
|
474 |
||
475 |
|f| |
|
476 |
||
477 |
LastFileSelectionDirectory notNil ifTrue:[ |
|
478 |
((f := LastFileSelectionDirectory asFilename) exists |
|
479 |
and:[f isDirectory]) ifFalse:[ |
|
480 |
LastFileSelectionDirectory := nil. |
|
481 |
] |
|
482 |
]. |
|
483 |
^ LastFileSelectionDirectory |
|
484 |
! |
|
485 |
||
486 |
lastFileSelectionDirectory:aDirectoryString |
|
487 |
"set the name of the directory used in the previous |
|
488 |
fileSelection dialog. This will be used as default for the next dialog, |
|
489 |
if no explicit path is specified (see requestFileName:* methods)" |
|
490 |
||
491 |
LastFileSelectionDirectory := aDirectoryString |
|
3953 | 492 |
! |
493 |
||
494 |
setDoubleClickActionFor:instance |
|
495 |
||
496 |
instance doubleClickAction:[:anIndex| |
|
497 |
| item | |
|
498 |
item := instance treeBrowser fileList at:anIndex ifAbsent:nil. |
|
499 |
item notNil ifTrue:[ |
|
500 |
((instance viewFiles and:[item isDirectory not]) or:[instance viewFiles not]) ifTrue:[ |
|
501 |
instance doAccept. |
|
502 |
] |
|
503 |
] |
|
504 |
]. |
|
3892 | 505 |
! ! |
506 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
507 |
!FileDialog class methodsFor:'active help'! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
508 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
509 |
flyByHelpSpec |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
510 |
<resource: #help> |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
511 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
512 |
|spec hist| |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
513 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
514 |
spec := super flyByHelpSpec addPairsFrom:#( |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
515 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
516 |
#directoryUp |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
517 |
'Directory Up' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
518 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
519 |
#directoryBack |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
520 |
'Directory Back' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
521 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
522 |
#directoryForward |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
523 |
'Directory Forward' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
524 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
525 |
#directoryHistory |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
526 |
'Directory' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
527 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
528 |
#fileHome |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
529 |
'Home Directory' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
530 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
531 |
#fileGotoDefault |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
532 |
'Default Directory (ST/X Start Directory)' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
533 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
534 |
#fileHistory |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
535 |
'File History' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
536 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
537 |
). |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
538 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
539 |
"/ hist := self directoryHistory. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
540 |
"/ hist notNil ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
541 |
"/ hist canForward ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
542 |
"/ spec at:#directoryForward put:(self classResources string:'Forward to: %1' with:hist nextForwardItem). |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
543 |
"/ ]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
544 |
"/ hist canBackward ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
545 |
"/ spec at:#directoryBack put:(self classResources string:'Back to: %1' with:hist nextBackwardItem). |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
546 |
"/ ]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
547 |
"/ ]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
548 |
^ spec. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
549 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
550 |
" |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
551 |
self flyByHelpSpec |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
552 |
" |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
553 |
! ! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
554 |
|
3892 | 555 |
!FileDialog class methodsFor:'interface specs'! |
556 |
||
557 |
windowSpec |
|
558 |
"This resource specification was automatically generated |
|
559 |
by the UIPainter of ST/X." |
|
560 |
||
561 |
"Do not manually edit this!! If it is corrupted, |
|
562 |
the UIPainter may not be able to read the specification." |
|
563 |
||
564 |
" |
|
565 |
UIPainter new openOnClass:FileDialog andSelector:#windowSpec |
|
566 |
FileDialog new openInterface:#windowSpec |
|
567 |
FileDialog open |
|
568 |
" |
|
569 |
||
570 |
<resource: #canvas> |
|
571 |
||
572 |
^ |
|
573 |
#(#FullSpec |
|
574 |
#name: #windowSpec |
|
575 |
#window: |
|
576 |
#(#WindowSpec |
|
577 |
#label: 'FileDialog' |
|
578 |
#name: 'FileDialog' |
|
579 |
#min: #(#Point 10 10) |
|
580 |
#max: #(#Point 1024 768) |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
581 |
#bounds: #(#Rectangle 16 46 416 446) |
3892 | 582 |
) |
583 |
#component: |
|
584 |
#(#SpecCollection |
|
585 |
#collection: #( |
|
586 |
#(#MenuPanelSpec |
|
587 |
#name: 'ToolBar1' |
|
588 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 30 0) |
|
589 |
#tabable: true |
|
590 |
#menu: #toolBarMenu |
|
591 |
#textDefault: true |
|
592 |
) |
|
593 |
#(#SubCanvasSpec |
|
594 |
#name: 'DirectoryTreeBrowser' |
|
595 |
#layout: #(#LayoutFrame 0 0.0 30 0 0 1.0 -107 1) |
|
596 |
#tabable: true |
|
597 |
#hasHorizontalScrollBar: false |
|
598 |
#hasVerticalScrollBar: false |
|
599 |
#majorKey: #DirectoryTreeBrowser |
|
600 |
#createNewApplication: true |
|
601 |
#createNewBuilder: true |
|
602 |
#postBuildCallback: #postBuildTreeBrowser: |
|
603 |
) |
|
604 |
#(#LabelSpec |
|
605 |
#label: 'Filename:' |
|
606 |
#name: 'FilenameLabel' |
|
607 |
#layout: #(#LayoutFrame 3 0 -97 1 73 0 -77 1) |
|
608 |
#translateLabel: true |
|
3904 | 609 |
#labelChannel: #filenameLabelHolder |
3892 | 610 |
#adjust: #left |
611 |
) |
|
612 |
#(#FilenameInputFieldSpec |
|
613 |
#name: 'FilenameEntryField' |
|
614 |
#layout: #(#LayoutFrame 70 0 -96 1 -10 1 -76 1) |
|
615 |
#tabable: true |
|
616 |
#model: #filenameHolder |
|
3959 | 617 |
#immediateAccept: false |
3892 | 618 |
#acceptOnPointerLeave: false |
619 |
#postBuildCallback: #postBuildFileNameField: |
|
620 |
) |
|
621 |
#(#LabelSpec |
|
622 |
#label: 'Filter:' |
|
623 |
#name: 'FilterLabel' |
|
624 |
#layout: #(#LayoutFrame 3 0 -70 1 67 0 -50 1) |
|
625 |
#translateLabel: true |
|
626 |
#adjust: #left |
|
627 |
) |
|
628 |
#(#InputFieldSpec |
|
629 |
#name: 'FilterEntryField' |
|
630 |
#layout: #(#LayoutFrame 70 0 -69 1 -10 1 -49 1) |
|
631 |
#model: #filterHolder |
|
3958 | 632 |
#immediateAccept: false |
3892 | 633 |
#acceptOnReturn: true |
634 |
#acceptOnTab: true |
|
635 |
#acceptOnLostFocus: true |
|
636 |
#acceptOnPointerLeave: false |
|
637 |
#postBuildCallback: #postBuildFilterField: |
|
638 |
) |
|
639 |
#(#HorizontalPanelViewSpec |
|
640 |
#name: 'ButtonPanel' |
|
641 |
#layout: #(#LayoutFrame 0 0.0 -40 1 0 1 0 1) |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
642 |
#horizontalLayout: #fitSpace |
3892 | 643 |
#verticalLayout: #center |
644 |
#horizontalSpace: 3 |
|
645 |
#verticalSpace: 3 |
|
646 |
#reverseOrderIfOKAtLeft: true |
|
647 |
#component: |
|
648 |
#(#SpecCollection |
|
649 |
#collection: #( |
|
650 |
#(#ActionButtonSpec |
|
651 |
#label: 'Cancel' |
|
652 |
#name: 'cancelButton' |
|
653 |
#translateLabel: true |
|
654 |
#labelChannel: #cancelLabelHolder |
|
655 |
#tabable: true |
|
656 |
#model: #doCancel |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
657 |
#extent: #(#Point 129 21) |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
658 |
) |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
659 |
#(#ActionButtonSpec |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
660 |
#label: 'Append' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
661 |
#name: 'appendButton' |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
662 |
#visibilityChannel: #appendButtonVisibleHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
663 |
#translateLabel: true |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
664 |
#labelChannel: #appendLabelHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
665 |
#tabable: true |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
666 |
#model: #appendPressed |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
667 |
#extent: #(#Point 129 22) |
3892 | 668 |
) |
669 |
#(#ActionButtonSpec |
|
670 |
#label: 'OK' |
|
671 |
#name: 'okButton' |
|
672 |
#translateLabel: true |
|
673 |
#labelChannel: #okLabelHolder |
|
674 |
#tabable: true |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
675 |
#model: #okPressed |
3892 | 676 |
#isDefault: true |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
677 |
#extent: #(#Point 130 22) |
3892 | 678 |
) |
679 |
) |
|
680 |
||
681 |
) |
|
682 |
) |
|
683 |
) |
|
684 |
||
685 |
) |
|
686 |
) |
|
687 |
! ! |
|
688 |
||
689 |
!FileDialog class methodsFor:'menu specs'! |
|
690 |
||
691 |
toolBarMenu |
|
692 |
"This resource specification was automatically generated |
|
693 |
by the MenuEditor of ST/X." |
|
694 |
||
695 |
"Do not manually edit this!! If it is corrupted, |
|
696 |
the MenuEditor may not be able to read the specification." |
|
697 |
||
698 |
" |
|
699 |
MenuEditor new openOnClass:FileDialog andSelector:#toolBarMenu |
|
700 |
(Menu new fromLiteralArrayEncoding:(FileDialog toolBarMenu)) startUp |
|
701 |
" |
|
702 |
||
703 |
<resource: #menu> |
|
704 |
||
705 |
^ |
|
706 |
#(#Menu |
|
707 |
#( |
|
708 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
709 |
#activeHelpKey: #directoryUp |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
710 |
#enabled: #enableDirectoryUp |
3892 | 711 |
#label: 'DirectoryUp' |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
712 |
#itemValue: #doGoDirectoryUp |
3892 | 713 |
#translateLabel: true |
714 |
#isButton: true |
|
715 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #upArrow20x20Icon) |
|
716 |
) |
|
717 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
718 |
#label: '' |
3892 | 719 |
) |
720 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
721 |
#activeHelpKey: #directoryBack |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
722 |
#enabled: #enableBack |
3892 | 723 |
#label: 'Back' |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
724 |
#itemValue: #doBack |
3892 | 725 |
#translateLabel: true |
726 |
#isButton: true |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
727 |
#submenuChannel: #menuDirHistoryBack |
3904 | 728 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #leftArrow20x20Icon) |
3892 | 729 |
) |
730 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
731 |
#label: '' |
3892 | 732 |
) |
733 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
734 |
#activeHelpKey: #directoryForward |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
735 |
#enabled: #enableForward |
3892 | 736 |
#label: 'Forward' |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
737 |
#itemValue: #doForward |
3892 | 738 |
#translateLabel: true |
739 |
#isButton: true |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
740 |
#submenuChannel: #menuDirHistoryForward |
3904 | 741 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #rightArrow20x20Icon) |
3892 | 742 |
) |
743 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
744 |
#label: '' |
3892 | 745 |
) |
746 |
#(#MenuItem |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
747 |
#activeHelpKey: #fileHome |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
748 |
#enabled: #enableHome |
3892 | 749 |
#label: 'Home' |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
750 |
#itemValue: #doGotoHomeDirectory |
3892 | 751 |
#translateLabel: true |
752 |
#isButton: true |
|
753 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #goHomeIcon) |
|
754 |
) |
|
3923 | 755 |
#(#MenuItem |
756 |
#label: '-' |
|
757 |
) |
|
758 |
#(#MenuItem |
|
759 |
#label: 'New Directory' |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
760 |
#itemValue: #newDirectory |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
761 |
#translateLabel: true |
3923 | 762 |
#isButton: true |
3956 | 763 |
#isVisible: #newDirectoryVisibilityHolder |
3923 | 764 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #newDirectory20x20Icon) |
765 |
) |
|
3892 | 766 |
) |
767 |
nil |
|
768 |
nil |
|
769 |
) |
|
770 |
! ! |
|
771 |
||
772 |
!FileDialog methodsFor:'accessing'! |
|
773 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
774 |
addButton:aButton |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
775 |
DialogBox defaultOKButtonAtLeft ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
776 |
(self componentAt:#ButtonPanel) addSubView:aButton before:(self okButton) |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
777 |
] ifFalse:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
778 |
(self componentAt:#ButtonPanel) addSubView:aButton after:(self okButton) |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
779 |
]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
780 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
781 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
782 |
appendWasPressed |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
783 |
"valid after the dialog has been closed: true if append was pressed" |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
784 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
785 |
^ appendWasPressed |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
786 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
787 |
|
3956 | 788 |
asLoadDialog |
789 |
||
790 |
^ asLoadDialog |
|
791 |
! |
|
792 |
||
793 |
asLoadDialog:aBoolean |
|
794 |
||
795 |
asLoadDialog := aBoolean |
|
796 |
! |
|
797 |
||
3996 | 798 |
currentSelectedFiles |
799 |
||
800 |
| selectedFiles| |
|
801 |
||
802 |
selectedFiles := treeBrowser currentFileNameHolder value. |
|
803 |
^ selectedFiles select:[:aFile| aFile isDirectory not]. |
|
804 |
! |
|
805 |
||
3892 | 806 |
directory |
807 |
"return the value of the instance variable 'directory' (automatically generated)" |
|
808 |
||
809 |
^ directory |
|
810 |
! |
|
811 |
||
812 |
directory:something |
|
813 |
"set the value of the instance variable 'directory' (automatically generated)" |
|
814 |
||
815 |
directory := something. |
|
816 |
! |
|
817 |
||
3953 | 818 |
doubleClickAction |
819 |
"return the value of the instance variable 'doubleClickAction' (automatically generated)" |
|
820 |
||
821 |
^ doubleClickAction |
|
822 |
! |
|
823 |
||
824 |
doubleClickAction:something |
|
825 |
"set the value of the instance variable 'doubleClickAction' (automatically generated)" |
|
826 |
||
827 |
doubleClickAction := something. |
|
828 |
! |
|
829 |
||
3892 | 830 |
initialText |
831 |
"return the value of the instance variable 'initialText' (automatically generated)" |
|
832 |
||
833 |
^ initialText |
|
834 |
! |
|
835 |
||
836 |
initialText:something |
|
837 |
"set the value of the instance variable 'initialText' (automatically generated)" |
|
838 |
||
839 |
initialText := something. |
|
840 |
! |
|
841 |
||
3958 | 842 |
multipleSelect |
843 |
"return the value of the instance variable 'pattern' (automatically generated)" |
|
844 |
||
845 |
multipleSelect isNil ifTrue:[ |
|
846 |
multipleSelect := true. |
|
847 |
]. |
|
848 |
^ multipleSelect |
|
849 |
! |
|
850 |
||
851 |
multipleSelect:aBoolean |
|
852 |
"set the value of the instance variable 'multipleSelect' (automatically generated)" |
|
853 |
||
854 |
multipleSelect := aBoolean |
|
855 |
! |
|
856 |
||
3956 | 857 |
newDirectoryVisibilityHolder |
858 |
"return the value of the instance variable 'newDirectoryVisibilityHolder' (automatically generated)" |
|
859 |
||
860 |
newDirectoryVisibilityHolder isNil ifTrue:[ |
|
861 |
newDirectoryVisibilityHolder := true asValue. |
|
862 |
]. |
|
863 |
^ newDirectoryVisibilityHolder |
|
864 |
! |
|
865 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
866 |
okButton |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
867 |
^ (self componentAt:#okButton) |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
868 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
869 |
|
3892 | 870 |
pattern |
871 |
"return the value of the instance variable 'pattern' (automatically generated)" |
|
872 |
||
873 |
^ pattern |
|
874 |
! |
|
875 |
||
876 |
pattern:something |
|
877 |
"set the value of the instance variable 'pattern' (automatically generated)" |
|
878 |
||
879 |
pattern := something. |
|
880 |
! |
|
881 |
||
882 |
result |
|
883 |
"return the value of the instance variable 'result' (automatically generated)" |
|
884 |
||
885 |
^ result |
|
886 |
! |
|
887 |
||
888 |
result:something |
|
889 |
"set the value of the instance variable 'result' (automatically generated)" |
|
890 |
||
891 |
result := something. |
|
892 |
! |
|
893 |
||
3904 | 894 |
selectedDirectories |
895 |
||
896 |
| selectedFiles| |
|
897 |
||
898 |
selectedFiles := treeBrowser currentFileNameHolder value. |
|
899 |
^ selectedFiles select:[:aFile| aFile isDirectory]. |
|
900 |
! |
|
901 |
||
3892 | 902 |
startFilename |
903 |
"return the value of the instance variable 'startFilename' (automatically generated)" |
|
904 |
||
905 |
startFilename isNil ifTrue:[ |
|
906 |
startFilename := Filename currentDirectory asAbsoluteFilename. |
|
907 |
]. |
|
908 |
^ startFilename |
|
909 |
! |
|
910 |
||
911 |
startFilename:something |
|
912 |
"set the value of the instance variable 'startFilename' (automatically generated)" |
|
913 |
||
914 |
startFilename := something. |
|
915 |
! |
|
916 |
||
3904 | 917 |
treeBrowser |
918 |
"return the value of the instance variable 'treeBrowser' (automatically generated)" |
|
919 |
||
920 |
^ treeBrowser |
|
921 |
! |
|
922 |
||
3892 | 923 |
viewFiles |
924 |
"return the value of the instance variable 'viewFiles' (automatically generated)" |
|
925 |
||
926 |
^ viewFiles |
|
927 |
! |
|
928 |
||
929 |
viewFiles:something |
|
930 |
"set the value of the instance variable 'viewFiles' (automatically generated)" |
|
931 |
||
932 |
viewFiles := something. |
|
933 |
! ! |
|
934 |
||
935 |
!FileDialog methodsFor:'aspects'! |
|
936 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
937 |
appendButtonVisibleHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
938 |
appendButtonVisibleHolder isNil ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
939 |
appendButtonVisibleHolder := false asValue. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
940 |
]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
941 |
^ appendButtonVisibleHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
942 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
943 |
|
3892 | 944 |
cancelLabelHolder |
945 |
"automatically generated by UIPainter ..." |
|
946 |
||
947 |
"*** the code below creates a default model when invoked." |
|
948 |
"*** (which may not be the one you wanted)" |
|
949 |
"*** Please change as required and accept it in the browser." |
|
950 |
"*** (and replace this comment by something more useful ;-)" |
|
951 |
||
952 |
cancelLabelHolder isNil ifTrue:[ |
|
953 |
cancelLabelHolder := 'Cancel' asValue. |
|
954 |
]. |
|
955 |
^ cancelLabelHolder. |
|
956 |
! |
|
957 |
||
958 |
enableBack |
|
959 |
"Return a value holder for the input string. |
|
960 |
" |
|
961 |
enableBack isNil ifTrue:[ |
|
962 |
enableBack := treeBrowser enableBack. |
|
963 |
]. |
|
964 |
^ enableBack |
|
965 |
! |
|
966 |
||
967 |
enableDirectoryUp |
|
968 |
||
969 |
enableDirectoryUp isNil ifTrue:[ |
|
970 |
enableDirectoryUp := treeBrowser enableDirectoryUp. |
|
971 |
]. |
|
972 |
^ enableDirectoryUp |
|
973 |
! |
|
974 |
||
975 |
enableForward |
|
976 |
"Return a value holder for the input string. |
|
977 |
" |
|
978 |
enableForward isNil ifTrue:[ |
|
979 |
enableForward := treeBrowser enableForward. |
|
980 |
]. |
|
981 |
^ enableForward |
|
982 |
! |
|
983 |
||
984 |
enableHome |
|
985 |
"Return a value holder for the input string. |
|
986 |
" |
|
987 |
enableHome isNil ifTrue:[ |
|
988 |
enableHome := treeBrowser enableHome. |
|
989 |
]. |
|
990 |
^ enableHome |
|
991 |
! |
|
992 |
||
993 |
filenameHolder |
|
994 |
"Return a value holder with the filename. |
|
995 |
Shown in the filename input-field. |
|
996 |
Being the selection in the tree. |
|
997 |
" |
|
998 |
|holder| |
|
999 |
holder := builder bindingAt:#filenameHolder. |
|
1000 |
||
1001 |
holder ifNil:[ |
|
1002 |
holder := ValueHolder new. |
|
1003 |
holder addDependent:self. |
|
1004 |
builder aspectAt:#filenameHolder |
|
1005 |
put:holder. |
|
1006 |
]. |
|
1007 |
||
1008 |
^ holder. |
|
1009 |
! |
|
1010 |
||
3904 | 1011 |
filenameLabelHolder |
1012 |
"Return a value holder for the input string. |
|
1013 |
" |
|
1014 |
filenameLabelHolder isNil ifTrue:[ |
|
1015 |
filenameLabelHolder := 'Filename:' asValue. |
|
1016 |
]. |
|
1017 |
^ filenameLabelHolder |
|
1018 |
! |
|
1019 |
||
3892 | 1020 |
filterHolder |
4011 | 1021 |
"Return a value holder for filter |
3892 | 1022 |
" |
1023 |
||
1024 |
filterHolder isNil ifTrue:[ |
|
1025 |
filterHolder := treeBrowser filterModel. |
|
1026 |
self pattern notNil ifTrue:[ |
|
1027 |
filterHolder value:pattern. |
|
1028 |
] |
|
1029 |
]. |
|
1030 |
^ filterHolder |
|
1031 |
! |
|
1032 |
||
1033 |
okLabelHolder |
|
1034 |
"automatically generated by UIPainter ..." |
|
1035 |
||
1036 |
"*** the code below creates a default model when invoked." |
|
1037 |
"*** (which may not be the one you wanted)" |
|
1038 |
"*** Please change as required and accept it in the browser." |
|
1039 |
"*** (and replace this comment by something more useful ;-)" |
|
1040 |
||
1041 |
okLabelHolder isNil ifTrue:[ |
|
1042 |
okLabelHolder := 'OK' asValue. |
|
1043 |
]. |
|
1044 |
^ okLabelHolder. |
|
1045 |
! ! |
|
1046 |
||
1047 |
!FileDialog methodsFor:'change & update'! |
|
1048 |
||
1049 |
update:something with:aParameter from:changedObject |
|
1050 |
"Invoked when an object that I depend upon sends a change notification." |
|
1051 |
||
1052 |
"stub code automatically generated - please change as required" |
|
1053 |
||
1054 |
changedObject == treeBrowser currentFileNameHolder ifTrue:[ |
|
1055 |
| files newDir| |
|
1056 |
files := treeBrowser currentFileNameHolder value. |
|
1057 |
||
1058 |
(files isEmpty) ifTrue:[ |
|
1059 |
self filenameHolder value:nil withoutNotifying:self. |
|
1060 |
] ifFalse:[ |
|
1061 |
files size == 1 ifTrue:[ |
|
1062 |
self filenameHolder value:(files first) withoutNotifying:self. |
|
1063 |
] ifFalse:[ |
|
1064 |
self filenameHolder value:'' withoutNotifying:self. |
|
1065 |
]. |
|
1066 |
]. |
|
1067 |
]. |
|
3904 | 1068 |
changedObject == treeBrowser viewFilesInDirectoryTree ifTrue:[ |
1069 |
changedObject value ifTrue:[ |
|
4080 | 1070 |
self filenameLabelHolder value:(resources string:'Filename:'). |
3904 | 1071 |
] ifFalse:[ |
4080 | 1072 |
self filenameLabelHolder value:(resources string:'Directory:'). |
3904 | 1073 |
] |
1074 |
]. |
|
3892 | 1075 |
changedObject == self filenameHolder ifTrue:[ |
1076 |
(changedObject value asFilename exists not) ifTrue:[^ self]. |
|
1077 |
treeBrowser currentFileNameHolder value:(OrderedCollection with:(changedObject value asFilename)) withoutNotifying:self. |
|
1078 |
]. |
|
1079 |
changedObject == treeBrowser enableBack ifTrue:[ |
|
1080 |
self enableBack value:changedObject value. |
|
1081 |
^ self. |
|
1082 |
]. |
|
1083 |
changedObject == treeBrowser enableForward ifTrue:[ |
|
1084 |
self enableForward value:changedObject value. |
|
1085 |
^ self. |
|
1086 |
]. |
|
1087 |
changedObject == treeBrowser enableHome ifTrue:[ |
|
1088 |
self enableHome value:changedObject value. |
|
1089 |
^ self. |
|
1090 |
]. |
|
1091 |
changedObject == treeBrowser enableDirectoryUp ifTrue:[ |
|
1092 |
self enableDirectoryUp value:changedObject value. |
|
1093 |
^ self. |
|
1094 |
]. |
|
1095 |
^ super update:something with:aParameter from:changedObject |
|
1096 |
! ! |
|
1097 |
||
1098 |
!FileDialog methodsFor:'event handling'! |
|
1099 |
||
1100 |
processEvent:anEvent |
|
1101 |
"filter keyboard events. |
|
1102 |
Return true, if I have eaten the event" |
|
1103 |
||
1104 |
|focusView key rawKey| |
|
1105 |
||
1106 |
anEvent isKeyPressEvent ifTrue:[ |
|
1107 |
focusView := anEvent targetView. |
|
1108 |
key := anEvent key. |
|
1109 |
rawKey := anEvent rawKey. |
|
1110 |
||
1111 |
(focusView == filterField) ifTrue:[ |
|
1112 |
^ false. |
|
1113 |
]. |
|
1114 |
(focusView == filenameField) ifTrue:[ |
|
1115 |
^ false. |
|
1116 |
]. |
|
1117 |
]. |
|
1118 |
^ false |
|
1119 |
! ! |
|
1120 |
||
1121 |
!FileDialog methodsFor:'initialization & release'! |
|
1122 |
||
1123 |
postBuildFileNameField:aWidget |
|
1124 |
||
1125 |
filenameField := aWidget. |
|
1126 |
! |
|
1127 |
||
1128 |
postBuildFilterField:aWidget |
|
1129 |
||
1130 |
filterField := aWidget. |
|
1131 |
! |
|
1132 |
||
1133 |
postBuildTreeBrowser:aSubCanvasView |
|
1134 |
||
1135 |
treeBrowser := aSubCanvasView client. |
|
1136 |
! |
|
1137 |
||
4005
42f09ac0e0aa
Fix for multipleSelection settings (race condition pops debugger at telekom!)
Stefan Vogel <sv@exept.de>
parents:
3996
diff
changeset
|
1138 |
postBuildWith:aBuilder |
42f09ac0e0aa
Fix for multipleSelection settings (race condition pops debugger at telekom!)
Stefan Vogel <sv@exept.de>
parents:
3996
diff
changeset
|
1139 |
|
42f09ac0e0aa
Fix for multipleSelection settings (race condition pops debugger at telekom!)
Stefan Vogel <sv@exept.de>
parents:
3996
diff
changeset
|
1140 |
treeBrowser multipleSelect:self multipleSelect. |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1141 |
appendWasPressed := false. |
4005
42f09ac0e0aa
Fix for multipleSelection settings (race condition pops debugger at telekom!)
Stefan Vogel <sv@exept.de>
parents:
3996
diff
changeset
|
1142 |
^ super postBuildWith:aBuilder |
42f09ac0e0aa
Fix for multipleSelection settings (race condition pops debugger at telekom!)
Stefan Vogel <sv@exept.de>
parents:
3996
diff
changeset
|
1143 |
! |
42f09ac0e0aa
Fix for multipleSelection settings (race condition pops debugger at telekom!)
Stefan Vogel <sv@exept.de>
parents:
3996
diff
changeset
|
1144 |
|
3994 | 1145 |
postOpenWith:aBuilder |
3892 | 1146 |
|
1147 |
"/ self windowGroup addPreEventHook:self. |
|
1148 |
treeBrowser currentFileNameHolder addDependent:self. |
|
3953 | 1149 |
treeBrowser doubleClickAction:(self doubleClickAction). |
3892 | 1150 |
treeBrowser enableBack addDependent:self. |
1151 |
treeBrowser enableForward addDependent:self. |
|
1152 |
treeBrowser enableHome addDependent:self. |
|
1153 |
treeBrowser enableDirectoryUp addDependent:self. |
|
3904 | 1154 |
treeBrowser viewFilesInDirectoryTree addDependent:self. |
3982 | 1155 |
treeBrowser rootHolder value:((self directory) ? (Filename currentDirectory asAbsoluteFilename)). |
3904 | 1156 |
treeBrowser viewFilesInDirectoryTree value:(self viewFiles ? true). |
1157 |
treeBrowser viewFilesInDirectoryTree changed. |
|
3892 | 1158 |
treeBrowser currentFileNameHolder value:(OrderedCollection with:(self startFilename)). |
3956 | 1159 |
self asLoadDialog ifTrue:[ |
1160 |
treeBrowser newVisibilityHolder value:false. |
|
1161 |
treeBrowser allowFileOperations value:false. |
|
1162 |
self newDirectoryVisibilityHolder value:false. |
|
1163 |
]. |
|
3892 | 1164 |
self filenameHolder value:(self startFilename asString). |
4080 | 1165 |
self window label:(resources string:((self initialText) ? 'File Dialog')). |
3892 | 1166 |
^ super postOpenWith:aBuilder |
1167 |
! ! |
|
1168 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1169 |
!FileDialog methodsFor:'private'! |
3892 | 1170 |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1171 |
returnWasPressedInFilterField |
3892 | 1172 |
|ev| |
1173 |
||
1174 |
ev := self windowGroup lastEvent. |
|
1175 |
(ev notNil |
|
1176 |
and:[ev isKeyEvent |
|
1177 |
and:[ev key == #Return |
|
1178 |
and:[( ev targetView isSameOrComponentOf:filterField) |
|
1179 |
or:[ev targetView isSameOrComponentOf:filenameField]]]]) ifTrue:[ |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1180 |
^ true |
3892 | 1181 |
]. |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1182 |
^ false |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1183 |
! ! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1184 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1185 |
!FileDialog methodsFor:'user actions'! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1186 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1187 |
appendPressed |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1188 |
appendWasPressed := true. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1189 |
self commonAcceptAction. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1190 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1191 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1192 |
commonAcceptAction |
3959 | 1193 |
filenameField accept. |
3944 | 1194 |
self result:(self filenameHolder value asString). |
3892 | 1195 |
|
1196 |
^ super doAccept |
|
1197 |
! |
|
1198 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1199 |
doAccept |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1200 |
"force accept - ignore in filterField" |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1201 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1202 |
self returnWasPressedInFilterField ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1203 |
^ self |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1204 |
]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1205 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1206 |
appendWasPressed := false. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1207 |
self commonAcceptAction. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1208 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1209 |
|
3892 | 1210 |
doBack |
1211 |
||
1212 |
treeBrowser doBack. |
|
1213 |
! |
|
1214 |
||
1215 |
doCancel |
|
1216 |
||
1217 |
self result:nil. |
|
1218 |
^ super doCancel. |
|
1219 |
! |
|
1220 |
||
1221 |
doForward |
|
1222 |
||
1223 |
treeBrowser doForward. |
|
1224 |
! |
|
1225 |
||
1226 |
doGoDirectoryUp |
|
1227 |
||
1228 |
treeBrowser doGoDirectoryUp. |
|
1229 |
! |
|
1230 |
||
1231 |
doGotoHomeDirectory |
|
1232 |
||
1233 |
treeBrowser doGotoHomeDirectory. |
|
1234 |
! |
|
1235 |
||
1236 |
menuDirHistory:backOrForward |
|
1237 |
||
1238 |
^ treeBrowser menuDirHistory:backOrForward. |
|
1239 |
! |
|
1240 |
||
1241 |
menuDirHistoryBack |
|
1242 |
||
1243 |
^ treeBrowser menuDirHistory:#back. |
|
1244 |
! |
|
1245 |
||
1246 |
menuDirHistoryForward |
|
1247 |
||
1248 |
^ treeBrowser menuDirHistory:#forward. |
|
3923 | 1249 |
! |
1250 |
||
1251 |
newDirectory |
|
1252 |
||
1253 |
^ treeBrowser newDirectory |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1254 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1255 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1256 |
okPressed |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1257 |
self doAccept |
3892 | 1258 |
! ! |
1259 |
||
1260 |
!FileDialog class methodsFor:'documentation'! |
|
1261 |
||
1262 |
version |
|
4627 | 1263 |
^ '$Header: /cvs/stx/stx/libtool/FileDialog.st,v 1.26 2003-02-27 17:15:06 penk Exp $' |
3892 | 1264 |
! ! |