author | Claus Gittinger <cg@exept.de> |
Tue, 22 Aug 2000 00:45:25 +0200 | |
changeset 2227 | 58426f7611f2 |
parent 2081 | 7a72a50c0f22 |
child 2444 | a8c1811e9f9c |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1990 by Claus Gittinger |
59 | 3 |
All Rights Reserved |
0 | 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 |
||
2227 | 13 |
"{ Package: 'stx:libwidg' }" |
14 |
||
77 | 15 |
DialogBox subclass:#EnterBox |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
16 |
instanceVariableNames:'labelField enterField trimBlanks' |
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
17 |
classVariableNames:'' |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
18 |
poolDictionaries:'' |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
19 |
category:'Views-DialogBoxes' |
0 | 20 |
! |
21 |
||
1613 | 22 |
!EnterBox class methodsFor:'documentation'! |
3 | 23 |
|
38 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 1990 by Claus Gittinger |
|
59 | 27 |
All Rights Reserved |
38 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
3 | 38 |
documentation |
39 |
" |
|
355 | 40 |
Historic note: |
41 |
originally, ST/X had separate classes for the various entry methods; |
|
42 |
there were YesNoBox, EnterBox, InfoBox and so on. |
|
43 |
In the meantime, the DialogBox class (and therefore its alias: Dialog) |
|
44 |
is going to duplicate most funcionality found in these classes. |
|
45 |
||
46 |
In the future, those existing subclasses' functionality is going to |
|
47 |
be moved fully into Dialog, and the subclasses will be replaced by dummy |
|
48 |
delegators. (They will be kept for backward compatibility, though). |
|
49 |
||
50 |
||
38 | 51 |
this class implements a pop-up box to enter some string |
52 |
with 2 buttons; a cancel button, and a trigger-action button. |
|
242 | 53 |
Normally, the box is created and opened with the single message: |
54 |
EnterBox request:'someString' |
|
55 |
which returns nil if aborted and the entered string otherwise. |
|
3 | 56 |
|
242 | 57 |
However, to control more details of the box, it may also be created first |
58 |
(EnterBox new) and then modified as appropriate before its shown. |
|
59 |
||
60 |
For example, the boxes title can be changed with: |
|
61 |
||
62 |
aBox title:'some string' |
|
38 | 63 |
|
64 |
The two button-labels default to 'abort' and 'ok'; |
|
65 |
they can be changed using: |
|
3 | 66 |
|
242 | 67 |
aBox okText:'someString' |
68 |
aBox abortText:'someString' |
|
38 | 69 |
|
70 |
The initial text in the enterfield can be set using: |
|
3 | 71 |
|
242 | 72 |
aBox initialText:'someString' |
3 | 73 |
|
38 | 74 |
when the ok-button is pressed, an action is performed, which is |
75 |
set using: |
|
3 | 76 |
|
242 | 77 |
aBox action:[ ... ] |
3 | 78 |
|
38 | 79 |
the abort-action defaults to no-action, but can also be set. |
242 | 80 |
|
38 | 81 |
The box can be opened modal (i.e. the currently active view will |
82 |
be suspended) or modeless. The default is modal (i.e. sending #open |
|
83 |
is equivalent to #openModal). |
|
242 | 84 |
|
85 |
Most of the above is also available via messages to Dialog for ST-80 compatibility |
|
86 |
(i.e. Dialog request:someString' is the same as EnterBox request:'someString') |
|
585 | 87 |
|
88 |
[author:] |
|
89 |
Claus Gittinger |
|
90 |
||
91 |
[see also:] |
|
92 |
DialogBox |
|
593 | 93 |
EnterBox2 YesNoBox ListSelectionBox FileSelectionBox FileSaveBox |
94 |
EditField EditTextView |
|
95 |
EnterFieldGroup |
|
62 | 96 |
" |
97 |
! |
|
3 | 98 |
|
62 | 99 |
examples |
100 |
" |
|
242 | 101 |
examples (for ST-80 compatibility, please use Dialog messages): |
102 |
||
103 |
simple (most common): |
|
593 | 104 |
[exBegin] |
242 | 105 |
|someString| |
106 |
||
107 |
someString := EnterBox request:'enter a string'. |
|
655 | 108 |
Transcript showCR:someString |
593 | 109 |
[exEnd] |
110 |
||
59 | 111 |
|
242 | 112 |
creating first, setting actions and manually opening: |
593 | 113 |
[exBegin] |
242 | 114 |
|box| |
115 |
||
116 |
box := EnterBox new. |
|
117 |
box title:'your name please:'. |
|
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
118 |
box action:[:arg | Transcript showCR:'entered: ''' , arg printString , '''']. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
119 |
box open |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
120 |
[exEnd] |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
121 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
122 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
123 |
turning off trimming of leading/trailing spaces (seldom required): |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
124 |
[exBegin] |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
125 |
|box| |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
126 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
127 |
box := EnterBox new. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
128 |
box title:'your name please:'. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
129 |
box action:[:arg | Transcript showCR:'entered: ''' , arg printString , '''']. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
130 |
box trimBlanks:false. |
242 | 131 |
box open |
593 | 132 |
[exEnd] |
59 | 133 |
|
242 | 134 |
|
593 | 135 |
non-modal |
136 |
(just for the demo; it does not really make sense, |
|
137 |
since cancel-button has no effect): |
|
138 |
[exBegin] |
|
242 | 139 |
|box| |
8 | 140 |
|
242 | 141 |
box := EnterBox new. |
142 |
box title:'your name please:'. |
|
655 | 143 |
box action:[:arg | Transcript showCR:'entered: ' , arg printString]. |
242 | 144 |
box openModeless |
593 | 145 |
[exEnd] |
146 |
||
59 | 147 |
|
242 | 148 |
for easier instance creation, there are also some combination methods: |
593 | 149 |
[exBegin] |
242 | 150 |
|box| |
62 | 151 |
|
242 | 152 |
box := EnterBox |
153 |
title:'your name please:' |
|
655 | 154 |
action:[:arg | Transcript showCR:'entered: ' , arg printString]. |
593 | 155 |
box open |
156 |
[exEnd] |
|
157 |
||
62 | 158 |
|
59 | 159 |
If the box is needed to ask for a simple string, you can also use the |
160 |
#request method, to bring up a box, let it ask for something and return |
|
161 |
the entered string. This method will return nil, if the box was |
|
162 |
closed with the 'abort' button. |
|
163 |
Example: |
|
593 | 164 |
[exBegin] |
242 | 165 |
|box string| |
59 | 166 |
|
242 | 167 |
box := EnterBox request:'input some string:'. |
168 |
string isNil ifTrue:[ |
|
655 | 169 |
Transcript showCR:'no input' |
242 | 170 |
] ifFalse:[ |
655 | 171 |
Transcript showCR:('the entered string was: ' , string) |
242 | 172 |
] |
593 | 173 |
[exEnd] |
174 |
||
38 | 175 |
|
59 | 176 |
of course, this can be written shorter as: |
593 | 177 |
[exBegin] |
242 | 178 |
|string| |
59 | 179 |
|
242 | 180 |
string := EnterBox request:'input some string:'. |
181 |
string isNil ifTrue:[ |
|
655 | 182 |
Transcript showCR:'no input' |
242 | 183 |
] ifFalse:[ |
655 | 184 |
Transcript showCR:('the entered string was: ' , string) |
242 | 185 |
] |
593 | 186 |
[exEnd] |
181 | 187 |
|
188 |
||
189 |
A box for passwords is created with: |
|
593 | 190 |
[exBegin] |
242 | 191 |
|box| |
181 | 192 |
|
242 | 193 |
box := EnterBox |
194 |
title:'your name please:' |
|
655 | 195 |
action:[:arg | Transcript showCR:'entered: ' , arg printString]. |
242 | 196 |
box enterField passwordCharacter:$*. |
197 |
box showAtPointer |
|
593 | 198 |
[exEnd] |
199 |
||
181 | 200 |
|
201 |
or simply: |
|
593 | 202 |
[exBegin] |
242 | 203 |
|string| |
181 | 204 |
|
242 | 205 |
string := EnterBox requestPassword:'enter your password:'. |
655 | 206 |
Transcript showCR:string. |
593 | 207 |
[exEnd] |
208 |
||
209 |
ATTENTION: |
|
210 |
for ST-80 compatibility, please use protocol from Dialog |
|
211 |
(which is an alias for DialogBox): |
|
212 |
[exBegin] |
|
213 |
|string| |
|
214 |
||
215 |
string := Dialog request:'input some string:'. |
|
216 |
string isNil ifTrue:[ |
|
655 | 217 |
Transcript showCR:'no input' |
593 | 218 |
] ifFalse:[ |
655 | 219 |
Transcript showCR:('the entered string was: ' , string) |
593 | 220 |
] |
221 |
[exEnd] |
|
222 |
and: |
|
223 |
[exBegin] |
|
224 |
|string| |
|
225 |
||
226 |
string := Dialog requestPassword:'enter your password:'. |
|
655 | 227 |
Transcript showCR:string. |
593 | 228 |
[exEnd] |
3 | 229 |
" |
181 | 230 |
|
231 |
"Modified: 16.11.1995 / 21:28:11 / cg" |
|
3 | 232 |
! ! |
233 |
||
1613 | 234 |
!EnterBox class methodsFor:'instance creation'! |
0 | 235 |
|
236 |
action:aBlock |
|
237 |
"create and return a new EnterBox |
|
238 |
which will evaluate aBlock when 'ok' is pressed" |
|
239 |
||
240 |
^ (self new) action:aBlock |
|
241 |
||
655 | 242 |
"(EnterBox action:[:string | Transcript showCR:string]) showAtPointer" |
0 | 243 |
! |
244 |
||
62 | 245 |
title:titleString |
246 |
"create and return a new EnterBox with title aString" |
|
247 |
||
248 |
^ self new title:titleString |
|
249 |
! |
|
250 |
||
101 | 251 |
title:titleString action:aBlock |
252 |
"create and return a new EnterBox with title aString, |
|
253 |
which will evaluate aBlock when 'ok' is pressed" |
|
254 |
||
255 |
^ (self title:titleString) action:aBlock |
|
256 |
! |
|
257 |
||
197 | 258 |
title:titleString okText:okText abortText:abortText action:aBlock |
259 |
"create and return a new EnterBox with title aString, and buttons showing |
|
260 |
okText and abortText; it will evaluate aBlock when 'ok' is pressed" |
|
261 |
||
262 |
^ (self title:titleString okText:okText action:aBlock) abortText:abortText |
|
263 |
! |
|
264 |
||
101 | 265 |
title:titleString okText:okText action:aBlock |
266 |
"create and return a new EnterBox with title aString, and ok button showing |
|
267 |
okText; it will evaluate aBlock when 'ok' is pressed" |
|
268 |
||
269 |
^ (self title:titleString action:aBlock) okText:okText |
|
77 | 270 |
! ! |
271 |
||
1613 | 272 |
!EnterBox class methodsFor:'defaults'! |
77 | 273 |
|
197 | 274 |
defaultExtent |
571 | 275 |
"return the default extent of my instances. |
276 |
The value returned here is usually ignored, and |
|
277 |
the value from preferredExtent taken instead." |
|
278 |
||
1613 | 279 |
^ (Screen current pixelPerMillimeter * (60 @ 20)) rounded |
571 | 280 |
|
1613 | 281 |
"Modified: / 22.1.1998 / 09:57:26 / md" |
282 |
"Modified: / 27.7.1998 / 20:15:52 / cg" |
|
197 | 283 |
! |
284 |
||
77 | 285 |
minExtent |
286 |
^ self defaultExtent |
|
287 |
! ! |
|
288 |
||
1613 | 289 |
!EnterBox class methodsFor:'easy startup '! |
77 | 290 |
|
291 |
request:aTitle |
|
292 |
"create and show an enterBox asking for aTitle. |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
293 |
Return the enterred string or an empty string (if abort was pressed). |
77 | 294 |
The string may be empty, in case return was pressed immediately." |
295 |
||
296 |
^ self new request:aTitle |
|
297 |
||
298 |
" |
|
299 |
EnterBox request:'enter a string' |
|
300 |
" |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
301 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
302 |
"Modified: 27.1.1996 / 14:34:23 / cg" |
181 | 303 |
! |
304 |
||
305 |
requestPassword:aTitle |
|
306 |
"create and show an enterBox asking for aTitle. |
|
307 |
The box is setup to NOT display entered characters (as with password entry). |
|
308 |
Return the entered string or nil (if abort was pressed). |
|
309 |
The string may be empty, in case return was pressed immediately." |
|
310 |
||
311 |
^ self new requestPassword:aTitle |
|
312 |
||
313 |
" |
|
314 |
|s| |
|
315 |
||
316 |
s := EnterBox requestPassword:'enter a string'. |
|
655 | 317 |
Transcript showCR:'you entered: ' , s |
181 | 318 |
" |
319 |
||
320 |
"Created: 16.11.1995 / 21:25:08 / cg" |
|
77 | 321 |
! ! |
322 |
||
2227 | 323 |
!EnterBox methodsFor:'accessing-behavior'! |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
324 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
325 |
entryCompletionBlock:aBlock |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
326 |
"define an entryCompletion block; if nonNil, that one |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
327 |
is evaluated if TAB is pressed in the field and should |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
328 |
try to complete the input. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
329 |
Typically used with fileName-boxes." |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
330 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
331 |
enterField entryCompletionBlock:aBlock |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
332 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
333 |
"Modified: 22.5.1996 / 15:19:31 / cg" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
334 |
! |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
335 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
336 |
trimBlanks:aBoolean |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
337 |
"set/clear blank trimming in the returned string. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
338 |
By default, leading and trailing spaces are removed from the input; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
339 |
setting trimBlanks to false disables this behavior. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
340 |
(not normally useful in most applications)" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
341 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
342 |
trimBlanks := aBoolean |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
343 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
344 |
"Created: 22.5.1996 / 15:23:45 / cg" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
345 |
! ! |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
346 |
|
2227 | 347 |
!EnterBox methodsFor:'accessing-components'! |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
348 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
349 |
enterField |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
350 |
"provide access to the entryfield" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
351 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
352 |
^ enterField |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
353 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
354 |
"Created: 16.11.1995 / 21:23:48 / cg" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
355 |
! |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
356 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
357 |
labelField |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
358 |
"provide access to the labelfield" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
359 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
360 |
^ labelField |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
361 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
362 |
"Created: 16.11.1995 / 21:23:48 / cg" |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
363 |
! ! |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
364 |
|
2227 | 365 |
!EnterBox methodsFor:'accessing-contents'! |
77 | 366 |
|
367 |
contents |
|
368 |
"return my contents" |
|
369 |
||
370 |
^ enterField contents |
|
371 |
! |
|
372 |
||
144 | 373 |
contents:aString |
374 |
"set my contents" |
|
375 |
||
376 |
enterField contents:aString |
|
377 |
! |
|
378 |
||
77 | 379 |
initialText:aString |
380 |
"define the initial text in the enterfield. all will be selected initially" |
|
381 |
||
382 |
enterField initialText:aString |
|
383 |
! |
|
384 |
||
197 | 385 |
initialText:aString selectFrom:start to:stop |
386 |
"define the initial text in the enterfield, and the part to be selected" |
|
387 |
||
2081 | 388 |
self initialText:aString. |
389 |
self selectFrom:start to:stop |
|
390 |
! |
|
391 |
||
392 |
selectFrom:start to:stop |
|
393 |
"define the initial selection in the enterfield" |
|
394 |
||
197 | 395 |
enterField selectFromLine:1 col:start toLine:1 col:stop |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
396 |
! ! |
197 | 397 |
|
2227 | 398 |
!EnterBox methodsFor:'accessing-look'! |
144 | 399 |
|
2020 | 400 |
noCancel |
401 |
"make the cancel button invisible - i.e. only the ok button is shown. |
|
402 |
Not useful here, but useful with display-only textBoxes." |
|
403 |
||
404 |
abortButton beInvisible. |
|
405 |
! |
|
406 |
||
77 | 407 |
title:aString |
408 |
"set the title to be displayed at top of enterBox" |
|
409 |
||
410 |
|oldSize| |
|
411 |
||
412 |
aString ~= labelField label ifTrue:[ |
|
413 |
oldSize := labelField extent. |
|
414 |
labelField label:aString. |
|
110 | 415 |
labelField forceResize. |
77 | 416 |
|
118 | 417 |
shown ifTrue:[ |
418 |
labelField extent ~= oldSize ifTrue:[ |
|
419 |
self resize |
|
420 |
] |
|
77 | 421 |
] |
422 |
] |
|
423 |
! |
|
424 |
||
425 |
title:titleString okText:okString |
|
426 |
"set title and text in okbutton" |
|
427 |
||
428 |
(titleString ~= labelField label or:[okString ~= okButton label]) ifTrue:[ |
|
429 |
okButton label:okString. |
|
430 |
okButton resize. |
|
431 |
labelField label:titleString. |
|
110 | 432 |
labelField forceResize. |
97 | 433 |
shown ifTrue:[self resize]. |
77 | 434 |
] |
435 |
! |
|
436 |
||
437 |
title:titleString okText:okString abortText:abortString |
|
438 |
"set title and texts in the buttons" |
|
439 |
||
440 |
(titleString ~= labelField label |
|
441 |
or:[okString ~= okButton label |
|
442 |
or:[abortString ~= abortButton label]]) ifTrue:[ |
|
443 |
okButton label:okString. |
|
444 |
okButton resize. |
|
445 |
abortButton label:abortString. |
|
446 |
abortButton resize. |
|
447 |
labelField label:titleString. |
|
110 | 448 |
labelField forceResize. |
97 | 449 |
shown ifTrue:[self resize]. |
77 | 450 |
] |
197 | 451 |
! ! |
181 | 452 |
|
197 | 453 |
!EnterBox methodsFor:'change & update'! |
181 | 454 |
|
197 | 455 |
update:something with:someArgument from:changedObject |
456 |
"sent if my enterbox thinks it needs more real-estate ..." |
|
181 | 457 |
|
197 | 458 |
changedObject == enterField ifTrue:[ |
459 |
something == #preferredExtent ifTrue:[ |
|
460 |
shown ifTrue:[self resizeUnderPointer]. |
|
461 |
^ self |
|
462 |
] |
|
463 |
]. |
|
464 |
super update:something with:someArgument from:changedObject |
|
0 | 465 |
! ! |
466 |
||
467 |
!EnterBox methodsFor:'initialization'! |
|
468 |
||
77 | 469 |
createEnterField |
470 |
"this has been extracted from the initialize method |
|
121 | 471 |
to allow redefinition in subclasses. (FilenameEnterBox for example). |
472 |
It shall return a new instance of the desired editField class." |
|
77 | 473 |
|
121 | 474 |
^ EditField new. |
77 | 475 |
! |
476 |
||
0 | 477 |
initialize |
90 | 478 |
|space2 innerWidth| |
0 | 479 |
|
480 |
super initialize. |
|
481 |
||
1763 | 482 |
self addAbortAndOkButtons. |
77 | 483 |
|
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
484 |
trimBlanks := true. |
150 | 485 |
label := resources string:'Enter'. |
73 | 486 |
|
0 | 487 |
space2 := 2 * ViewSpacing. |
73 | 488 |
innerWidth := width - space2. |
0 | 489 |
|
490 |
labelField := Label in:self. |
|
118 | 491 |
labelField |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
492 |
label:''; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
493 |
borderWidth:0; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
494 |
adjust:#left; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
495 |
origin:(0.0 @ ViewSpacing) extent:[1.0 @ labelField height]; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
496 |
leftInset:ViewSpacing; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
497 |
rightInset:ViewSpacing. |
0 | 498 |
|
121 | 499 |
self addComponent:(enterField := self createEnterField). |
118 | 500 |
enterField |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
501 |
origin:[0.0 @ (space2 + labelField preferredExtent y "height")] |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
502 |
extent:(1.0 @ enterField height). |
118 | 503 |
enterField |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
504 |
leftInset:ViewSpacing-enterField borderWidth; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
505 |
rightInset:ViewSpacing; |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
506 |
leaveAction:[:key | self okPressed]. |
118 | 507 |
|
130 | 508 |
enterField addDependent:self. "to get preferredExtent-changes" |
0 | 509 |
|
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
510 |
self makeTabable:enterField |
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
511 |
|
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
512 |
"Modified: 31.5.1996 / 21:51:28 / cg" |
0 | 513 |
! |
514 |
||
515 |
reAdjustGeometry |
|
516 |
"sent late in snapin processing - gives me a chance |
|
517 |
to resize for new font dimensions" |
|
518 |
||
519 |
super reAdjustGeometry. |
|
520 |
labelField resize. |
|
521 |
okButton resize. |
|
522 |
abortButton resize. |
|
523 |
self resize |
|
59 | 524 |
! ! |
525 |
||
62 | 526 |
!EnterBox methodsFor:'queries'! |
0 | 527 |
|
130 | 528 |
preferredExtent |
572 | 529 |
"compute the boxes preferredExtent from the components' sizes" |
530 |
||
110 | 531 |
|wWanted hWanted wPanel vs2 min |
532 |
labelPref enterPref panelPref| |
|
59 | 533 |
|
797 | 534 |
"/ If I have an explicit preferredExtent .. |
535 |
||
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
536 |
preferredExtent notNil ifTrue:[ |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
537 |
^ preferredExtent |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
538 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
539 |
|
130 | 540 |
panelPref := buttonPanel preferredExtent. |
541 |
labelPref := labelField preferredExtent. |
|
542 |
enterPref := enterField preferredExtent. |
|
110 | 543 |
wWanted := (labelPref x max:enterPref x). |
544 |
wPanel := panelPref x. |
|
59 | 545 |
wPanel > wWanted ifTrue:[ |
572 | 546 |
wWanted := wPanel |
59 | 547 |
]. |
1615
7bb9ce880706
preferredExtent a bit smaller.
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
548 |
hWanted := labelPref y + ViewSpacing + enterPref y + |
7bb9ce880706
preferredExtent a bit smaller.
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
549 |
ViewSpacing + panelPref y + ViewSpacing. |
59 | 550 |
|
551 |
min := self class minExtent. |
|
552 |
wWanted < min x ifTrue:[ |
|
572 | 553 |
wWanted := min x |
59 | 554 |
]. |
555 |
hWanted < min y ifTrue:[ |
|
572 | 556 |
hWanted := min y |
59 | 557 |
]. |
110 | 558 |
vs2 := ViewSpacing * 2. |
572 | 559 |
^ (wWanted + vs2) @ (hWanted + vs2) |
560 |
||
1615
7bb9ce880706
preferredExtent a bit smaller.
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
561 |
"Modified: / 22.1.1998 / 09:57:55 / md" |
7bb9ce880706
preferredExtent a bit smaller.
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
562 |
"Modified: / 27.7.1998 / 20:18:41 / cg" |
0 | 563 |
! ! |
564 |
||
77 | 565 |
!EnterBox methodsFor:'startup'! |
566 |
||
567 |
request |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
568 |
"open the box and return the entered string |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
569 |
or an empty string, if abort was pressed" |
77 | 570 |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
571 |
^ self requestOnCancel:'' |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
572 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
573 |
"Modified: 27.1.1996 / 14:50:01 / cg" |
0 | 574 |
! |
575 |
||
77 | 576 |
request:title |
242 | 577 |
"set the title, open the box and return the entered string, |
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
578 |
or the empty string, if abort was pressed." |
0 | 579 |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
580 |
^ self request:title onCancel:'' |
242 | 581 |
|
582 |
" |
|
583 |
EnterBox request:'enter some string:' |
|
584 |
||
585 |
|bx| |
|
586 |
bx := EnterBox new. |
|
587 |
bx label:'foo bar baz'. |
|
588 |
bx request:'enter some string:' |
|
589 |
" |
|
590 |
||
591 |
"Created: 7.12.1995 / 23:12:19 / cg" |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
592 |
"Modified: 27.1.1996 / 14:49:23 / cg" |
181 | 593 |
! |
594 |
||
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
595 |
request:title onCancel:cancelValue |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
596 |
"set the title, open the box and return the entered string, |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
597 |
or cancelValue if abort was pressed." |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
598 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
599 |
self title:title. |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
600 |
^ self requestOnCancel:cancelValue |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
601 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
602 |
" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
603 |
EnterBox request:'enter some string:' onCancel:nil |
181 | 604 |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
605 |
|bx| |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
606 |
bx := EnterBox new. |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
607 |
bx label:'foo bar baz'. |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
608 |
bx request:'enter some string:' onCancel:#foo |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
609 |
" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
610 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
611 |
"Created: 7.12.1995 / 23:12:19 / cg" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
612 |
"Modified: 27.1.1996 / 14:48:39 / cg" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
613 |
! |
181 | 614 |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
615 |
requestOnCancel:cancelValue |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
616 |
"open the box and return the entered string |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
617 |
or cancelValue, if abort was pressed" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
618 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
619 |
self action:[:string | ^ string]. |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
620 |
self open. |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
621 |
^ cancelValue value |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
622 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
623 |
"Created: 27.1.1996 / 14:47:47 / cg" |
181 | 624 |
! |
625 |
||
626 |
requestPassword:title |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
627 |
"set the title, set password mode, open the box and return the entered string |
1879
25ac1b89ed31
change: return nil if cancel is pressed in #requestPassword.
Claus Gittinger <cg@exept.de>
parents:
1790
diff
changeset
|
628 |
or nil, if abort was pressed" |
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
629 |
|
1879
25ac1b89ed31
change: return nil if cancel is pressed in #requestPassword.
Claus Gittinger <cg@exept.de>
parents:
1790
diff
changeset
|
630 |
^ self requestPassword:title onCancel:nil |
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
631 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
632 |
"Created: 16.11.1995 / 21:25:33 / cg" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
633 |
"Modified: 27.1.1996 / 14:52:36 / cg" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
634 |
! |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
635 |
|
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
636 |
requestPassword:title onCancel:cancelValue |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
637 |
"set the title, set password mode, open the box and return the entered string |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
638 |
or cancelValue, if abort was pressed" |
181 | 639 |
|
640 |
enterField passwordCharacter:$*. |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
641 |
^ self request:title onCancel:cancelValue |
181 | 642 |
|
306
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
643 |
"Modified: 27.1.1996 / 14:34:07 / cg" |
6a6a1513b713
changed cancel-value to '' (ST-80 compat.); added xxx:onCancel: methods
Claus Gittinger <cg@exept.de>
parents:
242
diff
changeset
|
644 |
"Created: 27.1.1996 / 14:52:13 / cg" |
77 | 645 |
! ! |
197 | 646 |
|
647 |
!EnterBox methodsFor:'user actions'! |
|
648 |
||
649 |
hideAndEvaluate:aBlock |
|
650 |
"common processing for all ok-actions (see subclasses); |
|
651 |
if modal, shut down box. |
|
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
652 |
Then fetch entered string, trim spaces and evaluate actionBlock on it" |
197 | 653 |
|
654 |
|string| |
|
655 |
||
656 |
(windowGroup notNil and:[windowGroup isModal]) ifTrue:[ |
|
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
657 |
self hide. |
197 | 658 |
]. |
659 |
aBlock notNil ifTrue:[ |
|
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
660 |
string := self contents. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
661 |
string isNil ifTrue:[ |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
662 |
string := '' |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
663 |
] ifFalse:[ |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
664 |
trimBlanks ifTrue:[ |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
665 |
string := string withoutSeparators |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
666 |
] |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
667 |
]. |
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
668 |
aBlock value:string |
197 | 669 |
] |
669
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
670 |
|
fef6f8160573
allow blank-trimming to be turned off
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
671 |
"Modified: 22.5.1996 / 15:24:30 / cg" |
197 | 672 |
! ! |
673 |
||
1613 | 674 |
!EnterBox class methodsFor:'documentation'! |
242 | 675 |
|
676 |
version |
|
2227 | 677 |
^ '$Header: /cvs/stx/stx/libwidg/EnterBox.st,v 1.53 2000-08-21 22:43:50 cg Exp $' |
242 | 678 |
! ! |