# HG changeset patch # User Claus Gittinger # Date 1156412176 -7200 # Node ID f00242a1c6cd2b0bbcd10b59a5fbff94b01f8a84 # Parent 4a1ab6d0be699ab5fbed45381b7dee0866d24666 +confirm:withCancel:default: diff -r 4a1ab6d0be69 -r f00242a1c6cd DialogBox.st --- a/DialogBox.st Thu Aug 24 11:24:48 2006 +0200 +++ b/DialogBox.st Thu Aug 24 11:36:16 2006 +0200 @@ -1482,6 +1482,22 @@ " ! +confirm:msg withCancel:aBoolean default:default + "launch a Dialog, which allows user to enter yes, no and optionally: cancel. + return true for 'yes', false for 'no', nil for 'cancel'" + + aBoolean ifTrue:[ + ^ Dialog confirmWithCancel:msg default:default. + ] ifFalse:[ + ^ Dialog confirm:msg default:default. + ]. + + " + Dialog confirm:'really ?' withCancel:false + Dialog confirm:'really ?' withCancel:true + " +! + confirm:aString yesLabel:yesText noLabel:noText "launch a Dialog, which allows user to enter yes or no. return true for yes, false for no. @@ -8212,7 +8228,7 @@ !DialogBox class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.250 2006-08-24 09:24:44 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.251 2006-08-24 09:36:16 cg Exp $' ! ! DialogBox initialize!