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