UserConfirmation.st
branchjv
changeset 19948 be658f466bca
parent 18120 e3a375d5f6a8
parent 19929 b6b3207ad764
--- a/UserConfirmation.st	Mon Jun 06 10:37:21 2016 +0100
+++ b/UserConfirmation.st	Mon Jun 06 10:56:12 2016 +0100
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Notification subclass:#UserConfirmation
 	instanceVariableNames:'canCancel defaultAnswerInDialog defaultAnswer'
 	classVariableNames:''
@@ -150,12 +152,30 @@
     "
 ! !
 
+!UserConfirmation methodsFor:'queries'!
+
+askingContext
+    "return the context which did the confirm-request"
+
+    |con|
+
+    con := self suspendedContext.
+    [
+        (con selector startsWith:'confirm')
+        and:[ con method mclass == Object ]
+    ] whileTrue:[
+        con := con sender.
+    ].
+    ^con
+! !
+
 !UserConfirmation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UserConfirmation.st,v 1.8 2014-06-10 10:21:16 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/UserConfirmation.st,v 1.8 2014-06-10 10:21:16 cg Exp $'
+    ^ '$Header$'
 ! !
+