#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 12 May 2016 17:30:42 +0200
changeset 19796 f08240ae07ef
parent 19795 e40276e51301
child 19797 fb12455698e1
#FEATURE by cg class: Notification added: #notify #notify: #notify:with: changed: #query
Notification.st
--- a/Notification.st	Thu May 12 17:29:58 2016 +0200
+++ b/Notification.st	Thu May 12 17:30:42 2016 +0200
@@ -223,6 +223,18 @@
         raiseRequestErrorString:aMessageString in:thisContext sender
 !
 
+notify:aMessageString with:aParameter
+    "raise the query - return the handler's value, or the default
+     value, if there is no handler."
+
+    "/ cg: must be redefined, so we get a reasonable originator
+    "/ some apps depend on an originator being the non-exception context here.
+    "/ (do not do a self raiseRequestErrorString: here)
+    ^ self basicNew
+        parameter:aParameter;
+        raiseRequestErrorString:aMessageString in:thisContext sender
+!
+
 query
     "raise the query - return the handler's value, or the default
      value, if there is no handler.
@@ -314,11 +326,25 @@
 
 !Notification methodsFor:'queries'!
 
+notify
+    "notice the implementation on the class-side: if no additional parameters are to be passed,
+     we do not even arrive here, because query has inlined the raiseRequest code"
+
+    ^ self raiseRequestIn:thisContext sender
+!
+
+notify:aMessageString
+    "notice the implementation on the class-side: if no additional parameters are to be passed,
+     we do not even arrive here, because query has inlined the raiseRequest code"
+
+    ^ self raiseRequestErrorString:aMessageString in:thisContext sender
+!
+
 query
     "notice the implementation on the class-side: if no additional parameters are to be passed,
      we do not even arrive here, because query has inlined the raiseRequest code"
 
-    ^ self raiseRequest
+    ^ self raiseRequestIn:thisContext sender
 ! !
 
 !Notification methodsFor:'testing'!