|
Class: YesToAllConfirmation
Object
|
+--GenericException
|
+--Notification
|
+--YesToAllConfirmation
|
+--SameForAllNotification
- Package:
- stx:libbasic
- Category:
- Kernel-Exceptions-Notifications
- Version:
- rev:
1.8
date: 2021/01/20 15:57:55
- user: cg
- file: YesToAllConfirmation.st directory: libbasic
- module: stx stc-classLibrary: libbasic
used with confirmation dialogs, especially from the filebrowser and compilers
to up-notify that further such confirmations are not wanted by the user.
copyrightCOPYRIGHT (c) 2004 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
queries
-
notify
-
raise a notification; usually will be remembered in a handler for the next
query to return true
utilities
-
handleConfirmationIn: aBlock
-
evaluate aBlock;
if inside that block, a query for YesToAll is raised, remember it and
answer it as required.
Usage example(s):
YesToAllConfirmation
handleConfirmationIn:[
1 to:5 do:[:i |
|confirmed|
YesToAllConfirmation query ifFalse:[
confirmed := OptionBox
request:(i printString)
label:('Ask again and again')
image:(YesNoBox iconBitmap)
buttonLabels:#('Cancel' 'No' 'Yes' 'Yes to All')
values:#(nil false true #yesToAll)
default:false
onCancel:false.
confirmed == #yesToAll ifTrue:[
YesToAllConfirmation notify
].
].
Transcript showCR:i.
].
].
|
defaults
-
defaultResumeValue
-
the default answer, if no one handles the query
|