# HG changeset patch # User Claus Gittinger # Date 1061311121 -7200 # Node ID 6e4b5ada3f89c9e14c9978af24f41f09ef5d483d # Parent 401103ebccb7e4f76ebb4bcadd6fe4fe283971d4 +confirmWithCancel:default:onCancel: diff -r 401103ebccb7 -r 6e4b5ada3f89 DialogBox.st --- a/DialogBox.st Tue Aug 19 17:03:04 2003 +0200 +++ b/DialogBox.st Tue Aug 19 18:38:41 2003 +0200 @@ -1534,6 +1534,23 @@ " ! +confirmWithCancel:aString default:defaultValue onCancel:cancelValue + "launch a Dialog, which allows user to enter yes, no and cancel. + return true for 'yes', false for 'no', cancelValues value for 'cancel'" + + |answer| + + answer := self confirmWithCancel:aString default:defaultValue. + answer isNil ifTrue:[ + ^ cancelValue value + ]. + ^ answer + + " + Dialog confirmWithCancel:'really ?' onCancel:[AbortSignal raise] + " +! + confirmWithCancel:aString labels:labelArray "launch a Dialog, which allows user to enter cancel, no or yes. Return true for 'yes', false for 'no', nil for 'cancel'. @@ -7794,7 +7811,7 @@ !DialogBox class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.219 2003-08-19 15:03:04 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.220 2003-08-19 16:38:41 cg Exp $' ! ! DialogBox initialize!