equal
deleted
inserted
replaced
86 here, for the example, an anon Printer is defined. It is slow printing to the Transcript for a demo. |
86 here, for the example, an anon Printer is defined. It is slow printing to the Transcript for a demo. |
87 The interesting thing is the error handling which is demonstrated in printWithError: |
87 The interesting thing is the error handling which is demonstrated in printWithError: |
88 Any exception inside the worker object is returned back and raised in the active-object's client, |
88 Any exception inside the worker object is returned back and raised in the active-object's client, |
89 not in the worker (take a look at the call-chain, when running the example below). |
89 not in the worker (take a look at the call-chain, when running the example below). |
90 |
90 |
91 |
91 [exBegin] |
92 |workerClass worker| |
92 |workerClass worker| |
93 |
93 |
94 workerClass := ActiveObject |
94 workerClass := ActiveObject |
95 subclass:#Printer |
95 subclass:#Printer |
96 instanceVariableNames:'' |
96 instanceVariableNames:'' |
124 |
124 |
125 worker := workerClass new. |
125 worker := workerClass new. |
126 'now ready for printing'. |
126 'now ready for printing'. |
127 worker printWithError:'abcdef'. |
127 worker printWithError:'abcdef'. |
128 worker printWithError:'hello world'. |
128 worker printWithError:'hello world'. |
|
129 [exEnd] |
129 " |
130 " |
130 ! ! |
131 ! ! |
131 |
132 |
132 !ActiveObject class methodsFor:'initialization'! |
133 !ActiveObject class methodsFor:'initialization'! |
133 |
134 |