|
Class: YesToAllConfirmation
Object
|
+--GenericException
|
+--Notification
|
+--YesToAllConfirmation
|
+--SameForAllNotification
- Package:
- stx:libbasic
- Category:
- Kernel-Exceptions-Notifications
- Version:
- rev:
1.7
date: 2014/12/30 12:40:05
- 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.
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
|