class: CascadingNotification
authorClaus Gittinger <cg@exept.de>
Thu, 22 Aug 2013 15:03:15 +0200
changeset 15682 b52b3fbe9456
parent 15681 3e8d83ce8f96
child 15683 d72a36fe05b0
class: CascadingNotification comment/format in: #examples
CascadingNotification.st
--- a/CascadingNotification.st	Thu Aug 22 15:01:38 2013 +0200
+++ b/CascadingNotification.st	Thu Aug 22 15:03:15 2013 +0200
@@ -66,6 +66,7 @@
     zero := 0.
     CascadingNotification handle:[:n |
         Transcript showCR:'h1: ' , n description.
+        n proceedWith:1.    
     ] do:[
         CascadingNotification handle:[:n |
             Transcript showCR:'h2: ' , n description.
@@ -81,9 +82,11 @@
                             ex proceed
                         ] do:[
                             [
+                                |answer|
+
                                 1 // zero.  'an error which is caught in the handler'.
-                                CascadingNotification notify:'hello world'.
-                                Transcript showCR:'after notification 1'.
+                                answer := CascadingNotification notify:'hello world'.
+                                Transcript show:'after notification 1: '; showCR:answer.
                             ] value
                         ]
                     ] value
@@ -107,7 +110,7 @@
     ] do:[
         CascadingNotification handle:[:n |
             Transcript showCR:'h2: ' , n description.
-            n proceed.    
+            n proceedWith:2.    
         ] do:[
             CascadingNotification handle:[:n |
                 Transcript showCR:'h3: ' , n description.
@@ -120,9 +123,11 @@
                             ex proceed
                         ] do:[
                             [
+                                |answer|
+
                                 1 // zero.  'an error which is caught in the handler'.
-                                CascadingNotification notify:'hello world'.
-                                Transcript showCR:'after notification 1'.
+                                answer := CascadingNotification notify:'hello world'.
+                                Transcript show:'after notification 1: '; showCR:answer.
                             ] value
                         ]
                     ] value
@@ -158,9 +163,11 @@
                             ex proceed
                         ] do:[
                             [
+                                |answer|
+
                                 1 // zero.  'an error which is caught in the handler'.
-                                CascadingNotification notify:'hello world'.
-                                Transcript showCR:'after notification 1'.
+                                answer := CascadingNotification notify:'hello world'.
+                                Transcript show:'after notification 1: '; showCR:answer.
                             ] value
                         ]
                     ] value
@@ -211,11 +218,11 @@
 !CascadingNotification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CascadingNotification.st,v 1.1 2013-08-22 12:50:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CascadingNotification.st,v 1.2 2013-08-22 13:03:15 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CascadingNotification.st,v 1.1 2013-08-22 12:50:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CascadingNotification.st,v 1.2 2013-08-22 13:03:15 cg Exp $'
 ! !