author | Claus Gittinger <cg@exept.de> |
Tue, 31 Oct 2000 14:27:19 +0100 | |
changeset 2304 | c96b6b899023 |
parent 2074 | 24e9d7beed2b |
child 2361 | 227ff51a7e7b |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 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 |
||
2304
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
13 |
"{ Package: 'stx:libwidg' }" |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
14 |
|
0 | 15 |
WarningBox subclass:#YesNoBox |
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
16 |
instanceVariableNames:'' |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
17 |
classVariableNames:'RequestBitmap' |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
18 |
poolDictionaries:'' |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
19 |
category:'Views-DialogBoxes' |
0 | 20 |
! |
21 |
||
856 | 22 |
!YesNoBox class methodsFor:'documentation'! |
38 | 23 |
|
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1989 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 |
||
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 |
||
949 | 50 |
New applications should use corresponding confirmation |
51 |
methods from DialogBox. |
|
355 | 52 |
|
38 | 53 |
this class implements yes-no boxes by adding another (no-) Button to the WarnBox-View. |
54 |
They are created with: |
|
55 |
||
355 | 56 |
aBox := YesNoBox title:'some title'. |
57 |
aBox okAction:[ .. some action to be performed when ok is pressed ]. |
|
38 | 58 |
|
59 |
and finally shown with: |
|
0 | 60 |
|
355 | 61 |
aBox showAtPointer |
38 | 62 |
|
63 |
The default box shows 'yes' and 'no' in its buttons; this can be changed with: |
|
64 |
||
355 | 65 |
aBox yesText:'some string'. |
66 |
aBox noText:'some string'. |
|
38 | 67 |
|
68 |
There is also protocol to set both button titles in one message. |
|
69 |
Also, the action associated to the noButton can be changed. |
|
70 |
||
63 | 71 |
For very simple yes/no queries, you can also use the much simpler confirm:. |
72 |
Since implemented in Object, everyone understands confirm. You can pass |
|
73 |
a question message (but not change the buttons labels). |
|
74 |
Use is: |
|
355 | 75 |
self confirm:'some question' |
63 | 76 |
and will return true or false. |
125 | 77 |
|
78 |
For compatibility with ST-80, use: |
|
355 | 79 |
Dialog confirm:'hello' |
585 | 80 |
|
81 |
[see also:] |
|
82 |
DialogBox |
|
83 |
EnterBox |
|
84 |
||
85 |
[author:] |
|
86 |
Claus Gittinger |
|
87 |
||
63 | 88 |
" |
89 |
! |
|
90 |
||
91 |
examples |
|
92 |
" |
|
38 | 93 |
Examples: |
593 | 94 |
[exBegin] |
95 |
|aBox| |
|
38 | 96 |
|
593 | 97 |
aBox := YesNoBox title:'Coffee or tee ?'. |
98 |
aBox noText:'tee'. |
|
99 |
aBox yesText:'coffee'. |
|
655 | 100 |
aBox yesAction:[Transcript showCR:'make coffee']. |
101 |
aBox noAction:[Transcript showCR:'make tee']. |
|
593 | 102 |
aBox showAtPointer. |
103 |
[exEnd] |
|
38 | 104 |
or, shorter: |
593 | 105 |
[exBegin] |
106 |
|aBox| |
|
38 | 107 |
|
593 | 108 |
aBox := YesNoBox new. |
109 |
aBox title:'Coffee or Tee ?' |
|
655 | 110 |
yesAction:[Transcript showCR:'make coffee'] |
111 |
noAction:[Transcript showCR:'make tee']. |
|
593 | 112 |
aBox yesText:'Coffee' noText:'Tee'. |
113 |
aBox showAtPointer |
|
114 |
[exEnd] |
|
38 | 115 |
|
116 |
Also, have a look at the inherited protocol; for example, this allows changing |
|
117 |
the bitmap (default: a question mark) and other properties. |
|
59 | 118 |
|
119 |
If the box is needed to ask for a simple boolean, you can also use the |
|
120 |
#confirm method, to bring up a box, let it ask for something and return |
|
121 |
true or false. |
|
122 |
Example: |
|
593 | 123 |
[exBegin] |
124 |
|box value| |
|
59 | 125 |
|
593 | 126 |
box := YesNoBox new. |
127 |
value := box confirm:'yes or no:'. |
|
128 |
value ifTrue:[ |
|
655 | 129 |
Transcript showCR:'yes' |
593 | 130 |
] ifFalse:[ |
655 | 131 |
Transcript showCR:'no' |
593 | 132 |
] |
133 |
[exEnd] |
|
59 | 134 |
|
135 |
of course, this can also be written shorter as: |
|
593 | 136 |
[exBegin] |
137 |
(YesNoBox new confirm:'yes or no:') ifTrue:[ |
|
655 | 138 |
Transcript showCR:'yes' |
593 | 139 |
] ifFalse:[ |
655 | 140 |
Transcript showCR:'no' |
593 | 141 |
] |
142 |
[exEnd] |
|
125 | 143 |
or: |
593 | 144 |
[exBegin] |
145 |
(Dialog confirm:'yes or no:') ifTrue:[ |
|
655 | 146 |
Transcript showCR:'yes' |
593 | 147 |
] ifFalse:[ |
655 | 148 |
Transcript showCR:'no' |
593 | 149 |
] |
150 |
[exEnd] |
|
38 | 151 |
" |
152 |
! ! |
|
0 | 153 |
|
856 | 154 |
!YesNoBox class methodsFor:'instance creation'! |
59 | 155 |
|
1187 | 156 |
title:titleString yesText:yesString noText:noString |
572 | 157 |
"return a new YesNoBox with title, and buttonLabels yesString/noString" |
158 |
||
1187 | 159 |
^ (self new) title:titleString yesText:yesString noText:noString |
572 | 160 |
|
1187 | 161 |
"Modified: 11.4.1997 / 21:11:45 / cg" |
59 | 162 |
! ! |
163 |
||
856 | 164 |
!YesNoBox class methodsFor:'icon bitmap'! |
59 | 165 |
|
166 |
iconBitmap |
|
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
167 |
"return the bitmap shown as icon in my instances. |
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
168 |
This is the default image; you can overwrite this in a concrete |
1187 | 169 |
instance with the #image: message." |
59 | 170 |
|
1365 | 171 |
<resource: #style (#'requestBox.icon' #'requestBox.iconFile')> |
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
172 |
|
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
173 |
|img imgFileName| |
943 | 174 |
|
59 | 175 |
RequestBitmap isNil ifTrue:[ |
1365 | 176 |
img := StyleSheet at:'requestBox.icon'. |
943 | 177 |
img notNil ifTrue:[ |
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
178 |
RequestBitmap := img |
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
179 |
] ifFalse:[ |
1365 | 180 |
imgFileName := StyleSheet at:'requestBox.iconFile' default:'bitmaps/Request.xbm'. |
2074 | 181 |
RequestBitmap := Smalltalk imageFromFileNamed:imgFileName forClass:self. |
943 | 182 |
]. |
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
183 |
RequestBitmap notNil ifTrue:[ |
1987 | 184 |
RequestBitmap := RequestBitmap onDevice:Display |
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
185 |
] |
59 | 186 |
]. |
187 |
^ RequestBitmap |
|
943 | 188 |
|
1365 | 189 |
"Created: / 17.11.1995 / 18:16:47 / cg" |
190 |
"Modified: / 26.10.1997 / 17:06:19 / cg" |
|
59 | 191 |
! ! |
192 |
||
856 | 193 |
!YesNoBox class methodsFor:'styles'! |
197 | 194 |
|
195 |
updateStyleCache |
|
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
196 |
"extract values from the styleSheet and cache them in class variables. |
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
197 |
Here, the cached infoBitmap is simply flushed." |
197 | 198 |
|
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
199 |
RequestBitmap := nil |
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
200 |
|
1173
86440dfaca06
allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
201 |
"Modified: 1.4.1997 / 14:51:30 / cg" |
197 | 202 |
! ! |
203 |
||
204 |
!YesNoBox methodsFor:'accessing'! |
|
205 |
||
206 |
noAction:aBlock |
|
949 | 207 |
"define the action to be performed when 'no' is pressed" |
197 | 208 |
|
209 |
abortAction := aBlock |
|
949 | 210 |
|
211 |
"Modified: 16.1.1997 / 11:29:18 / cg" |
|
197 | 212 |
! |
213 |
||
214 |
noButton |
|
215 |
"return the no-button" |
|
216 |
||
217 |
^ abortButton |
|
218 |
! |
|
219 |
||
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
220 |
noLabel:aString |
949 | 221 |
"define the label of the 'no'-button. |
222 |
And alias for #noText: - for backward compatibility" |
|
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
223 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
224 |
self noText:aString. |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
225 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
226 |
"Created: 13.12.1995 / 16:21:57 / cg" |
949 | 227 |
"Modified: 16.1.1997 / 11:30:25 / cg" |
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
228 |
! |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
229 |
|
197 | 230 |
noText:aString |
949 | 231 |
"define the label of the no-button. |
232 |
If not set, it defaults to the resource-string for 'no'." |
|
197 | 233 |
|
234 |
aString ~= abortButton label ifTrue:[ |
|
949 | 235 |
abortButton label:aString. |
236 |
abortButton resize. |
|
237 |
shown ifTrue:[self resize] |
|
197 | 238 |
] |
949 | 239 |
|
240 |
"Modified: 16.1.1997 / 11:30:01 / cg" |
|
197 | 241 |
! |
242 |
||
243 |
okText:yesString noText:noString |
|
949 | 244 |
"define the labels of both buttons. |
245 |
Alias for yesText:noText: for backward compatibility." |
|
197 | 246 |
|
247 |
^ self yesText:yesString noText:noString |
|
949 | 248 |
|
249 |
"Modified: 16.1.1997 / 11:30:58 / cg" |
|
197 | 250 |
! |
251 |
||
252 |
title:aString yesAction:yesBlock noAction:noBlock |
|
253 |
"define title and actions" |
|
59 | 254 |
|
197 | 255 |
self title:aString. |
256 |
okAction := yesBlock. |
|
257 |
abortAction := noBlock |
|
258 |
! |
|
259 |
||
260 |
title:aString yesText:yesString noText:noString |
|
261 |
"define title and button labels" |
|
262 |
||
263 |
self title:aString. |
|
264 |
self yesText:yesString noText:noString |
|
265 |
! |
|
266 |
||
267 |
yesAction:aBlock |
|
949 | 268 |
"define the action to be performed when 'yes' is pressed" |
197 | 269 |
|
270 |
okAction := aBlock |
|
949 | 271 |
|
272 |
"Modified: 16.1.1997 / 11:31:21 / cg" |
|
197 | 273 |
! |
274 |
||
275 |
yesAction:yesBlock noAction:noBlock |
|
276 |
"define both actions" |
|
277 |
||
278 |
okAction := yesBlock. |
|
279 |
abortAction := noBlock |
|
280 |
! |
|
281 |
||
282 |
yesButton |
|
949 | 283 |
"return the 'yes'-button" |
197 | 284 |
|
285 |
^ okButton |
|
949 | 286 |
|
287 |
"Modified: 16.1.1997 / 11:31:27 / cg" |
|
197 | 288 |
! |
289 |
||
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
290 |
yesLabel:aString |
949 | 291 |
"define the label of the 'yes'-button. |
292 |
An alias for #yesText: for backward compatibility." |
|
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
293 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
294 |
self yesText:aString. |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
295 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
296 |
"Created: 13.12.1995 / 16:22:05 / cg" |
949 | 297 |
"Modified: 16.1.1997 / 11:31:58 / cg" |
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
298 |
! |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
299 |
|
197 | 300 |
yesText:aString |
949 | 301 |
"define the label of the 'yes'-button" |
197 | 302 |
|
303 |
self okText:aString |
|
949 | 304 |
|
305 |
"Modified: 16.1.1997 / 11:31:39 / cg" |
|
197 | 306 |
! |
307 |
||
308 |
yesText:yesString noText:noString |
|
309 |
"define the labels of both buttons" |
|
310 |
||
311 |
((yesString ~= okButton label) or:[noString ~= abortButton label]) ifTrue:[ |
|
373 | 312 |
okButton label:yesString. |
313 |
abortButton label:noString. |
|
314 |
okButton resize. |
|
315 |
abortButton resize. |
|
316 |
shown ifTrue:[self resize] |
|
197 | 317 |
] |
373 | 318 |
|
319 |
"Modified: 21.2.1996 / 00:58:38 / cg" |
|
59 | 320 |
! ! |
321 |
||
0 | 322 |
!YesNoBox methodsFor:'initialization'! |
323 |
||
324 |
initialize |
|
1760
631f902aaabe
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
1365
diff
changeset
|
325 |
<resource: #style (#'dialogBox.okAtLeft')> |
631f902aaabe
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
1365
diff
changeset
|
326 |
|
0 | 327 |
super initialize. |
328 |
||
150 | 329 |
label := resources string:'Choose'. |
79 | 330 |
|
130 | 331 |
buttonPanel horizontalLayout:#fitSpace. "/ looks better; should it come from the StyleSheet ? |
63 | 332 |
|
946 | 333 |
textLabel label:(resources string:'please confirm'). |
334 |
okButton label:(resources string:'yes'). |
|
0 | 335 |
|
162 | 336 |
abortButton := Button abortButton. |
2304
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
337 |
|
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
338 |
"/ changed: |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
339 |
"/ now exclusively done by the buttonPanel itself |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
340 |
|
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
341 |
"/ (styleSheet at:'dialogBox.okAtLeft' default:false) ifTrue:[ |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
342 |
"/ buttonPanel addSubView:abortButton after:okButton. |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
343 |
"/ ] ifFalse:[ |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
344 |
"/ buttonPanel addSubView:abortButton before:okButton. |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
345 |
"/ ]. |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
346 |
buttonPanel addSubView:abortButton before:okButton. |
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
347 |
|
946 | 348 |
abortButton label:(resources string:'no'). |
162 | 349 |
abortButton height:(okButton height). |
350 |
abortButton model:self; change:#noPressed |
|
856 | 351 |
|
946 | 352 |
"Modified: 15.1.1997 / 23:32:21 / cg" |
197 | 353 |
! ! |
354 |
||
355 |
!YesNoBox methodsFor:'queries'! |
|
356 |
||
357 |
preferredExtent |
|
572 | 358 |
"compute the boxes preferredExtent from the components' sizes" |
359 |
||
373 | 360 |
|w h max mm| |
361 |
||
796 | 362 |
"/ If I have an explicit preferredExtent .. |
363 |
||
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
364 |
preferredExtent notNil ifTrue:[ |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
365 |
^ preferredExtent |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
366 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
655
diff
changeset
|
367 |
|
373 | 368 |
mm := ViewSpacing. |
79 | 369 |
|
197 | 370 |
" |
371 |
make the two buttons of equal size |
|
372 |
" |
|
373 |
max := okButton preferredExtent x max:abortButton preferredExtent x. |
|
374 |
okButton width:max. |
|
375 |
abortButton width:max. |
|
373 | 376 |
|
197 | 377 |
w := (formLabel width + textLabel width) max:max * 2. |
373 | 378 |
w := w + (3 * mm) + (okButton borderWidth + abortButton borderWidth * 2). |
379 |
h := (mm * 5) |
|
380 |
+ ((formLabel height) max:(textLabel height)) |
|
381 |
+ okButton heightIncludingBorder. |
|
197 | 382 |
|
383 |
^ (w @ h). |
|
373 | 384 |
|
796 | 385 |
"Modified: 19.7.1996 / 20:45:53 / cg" |
59 | 386 |
! ! |
38 | 387 |
|
59 | 388 |
!YesNoBox methodsFor:'startup'! |
389 |
||
390 |
confirm |
|
391 |
"open the receiver and return true for yes, false for no. |
|
392 |
This is an easier interface to use, since no action blocks |
|
393 |
have to be defined. The title is used as previously defined." |
|
38 | 394 |
|
59 | 395 |
self yesAction:[^ true] noAction:[^ false]. |
63 | 396 |
self showAtPointer. |
397 |
self yesAction:nil noAction:nil. "/ clear actions for earlier release of context |
|
38 | 398 |
|
59 | 399 |
" |
400 |
YesNoBox new confirm |
|
401 |
" |
|
0 | 402 |
! |
403 |
||
59 | 404 |
confirm:aString |
405 |
"open the receiver and return true for yes, false for no. |
|
406 |
This is an easier interface to use, since no action blocks |
|
407 |
have to be defined." |
|
38 | 408 |
|
59 | 409 |
self title:aString. |
410 |
^ self confirm |
|
411 |
||
412 |
" |
|
413 |
YesNoBox new confirm:'really ?' |
|
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
414 |
YesNoBox confirm:'really ?' |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
415 |
self confirm:'really ?' |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
416 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
417 |
for ST-80 compatibility, you should use Dialogs confirm |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
418 |
(which simply forwards the request to the YesNoBox anyway): |
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
419 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
420 |
Dialog confirm:'really ?' |
59 | 421 |
" |
253
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
422 |
|
f071ff350cd5
added confirm with button-labels
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
423 |
"Modified: 13.12.1995 / 16:20:01 / cg" |
0 | 424 |
! ! |
425 |
||
426 |
!YesNoBox methodsFor:'user interaction'! |
|
427 |
||
428 |
noPressed |
|
429 |
"user pressed the no-button; |
|
430 |
hide myself and evaluate the action" |
|
431 |
||
162 | 432 |
abortButton turnOffWithoutRedraw. |
433 |
self hideAndEvaluate:abortAction |
|
0 | 434 |
! ! |
435 |
||
856 | 436 |
!YesNoBox class methodsFor:'documentation'! |
243 | 437 |
|
438 |
version |
|
2304
c96b6b899023
button-roder reversal is now done exclusively in the buttonPanel
Claus Gittinger <cg@exept.de>
parents:
2074
diff
changeset
|
439 |
^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.45 2000-10-31 13:27:19 cg Exp $' |
243 | 440 |
! ! |