author | tz |
Fri, 03 Apr 1998 16:54:44 +0200 | |
changeset 1477 | 2d4b6115e2c5 |
parent 741 | eee7cb39bafe |
child 1762 | 848075aa087c |
permissions | -rw-r--r-- |
37 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
59 | 3 |
All Rights Reserved |
37 | 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 |
" |
|
12 |
||
13 |
FileSelectionBox subclass:#FileSaveBox |
|
585 | 14 |
instanceVariableNames:'appendButton appendAction' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Views-DialogBoxes' |
|
37 | 18 |
! |
19 |
||
20 |
!FileSaveBox class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
59 | 25 |
All Rights Reserved |
37 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
637 | 38 |
Instances of FileSaveBox add an 'append'-button, and an |
39 |
associated append-action. |
|
40 |
The other behavior is that of a FileSelectionBox. |
|
37 | 41 |
|
585 | 42 |
[Instance variables:] |
43 |
appendAction action to be performed when append is pressed |
|
44 |
||
45 |
||
46 |
[author:] |
|
47 |
Claus Gittinger |
|
48 |
||
49 |
[see also:] |
|
50 |
DialogBox |
|
648 | 51 |
EnterBox2 FilenameEnterBox YesNoBox |
585 | 52 |
ListSelectionBox FileSelectionBox |
37 | 53 |
" |
54 |
! ! |
|
55 |
||
197 | 56 |
!FileSaveBox methodsFor:'accessing'! |
37 | 57 |
|
197 | 58 |
appendAction:aBlock |
59 |
"set the action to be performed when append is pressed" |
|
60 |
||
61 |
appendAction := aBlock |
|
37 | 62 |
! ! |
63 |
||
64 |
!FileSaveBox methodsFor:'initialization'! |
|
65 |
||
197 | 66 |
initialize |
67 |
super initialize. |
|
68 |
||
69 |
label := resources string:'Save file dialog'. |
|
70 |
||
71 |
okButton label:(resources string:'save'). |
|
72 |
||
73 |
" |
|
74 |
insert an append-button between abort- and save-buttons |
|
75 |
" |
|
76 |
appendButton := Button okButton. |
|
77 |
appendButton isReturnButton:false. |
|
78 |
appendButton label:(resources string:'append'). |
|
79 |
appendButton action:[appendButton turnOffWithoutRedraw. self appendPressed]. |
|
80 |
buttonPanel addSubView:appendButton after:abortButton |
|
37 | 81 |
! ! |
82 |
||
197 | 83 |
!FileSaveBox methodsFor:'user interaction'! |
37 | 84 |
|
197 | 85 |
appendPressed |
637 | 86 |
"append was pressed - evaluate the append-action" |
87 |
||
197 | 88 |
self hideAndEvaluate:[:string | |
637 | 89 |
appendAction notNil ifTrue:[ |
90 |
appendAction value:string |
|
91 |
] |
|
197 | 92 |
] |
637 | 93 |
|
94 |
"Modified: 12.5.1996 / 21:45:52 / cg" |
|
197 | 95 |
! ! |
59 | 96 |
|
243 | 97 |
!FileSaveBox class methodsFor:'documentation'! |
98 |
||
99 |
version |
|
741
eee7cb39bafe
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
648
diff
changeset
|
100 |
^ '$Header: /cvs/stx/stx/libwidg/Attic/FSaveBox.st,v 1.12 1996-05-31 20:20:42 cg Exp $' |
243 | 101 |
! ! |