Notification.st
changeset 15668 d91b53dd8c85
parent 15285 7c7d4ed8296d
child 15680 9b6fca4e1eb9
child 18086 33a050555eb1
equal deleted inserted replaced
15667:3892295febb9 15668:d91b53dd8c85
    51 
    51 
    52     [author:]
    52     [author:]
    53         Stefan Vogel
    53         Stefan Vogel
    54 
    54 
    55     [see also:]
    55     [see also:]
    56         Signal QuerySignal
    56         Signal QuerySignal Query
    57 "
    57 "
    58 !
    58 !
    59 
    59 
    60 examples 
    60 examples 
    61 "
    61 "
   328         ^ true.
   328         ^ true.
   329     ].
   329     ].
   330     ^ false
   330     ^ false
   331 ! !
   331 ! !
   332 
   332 
   333 !Notification methodsFor:'private'!
       
   334 
       
   335 LATERdoCallHandler:aHandlerBlock
       
   336 "SV: Have to think about..."
       
   337     "call the handler proper
       
   338      - an extra method is needed to have a raise-marked context around.
       
   339        (see implementation of #reject and #proceed).
       
   340      Redefined from GenericException to do a proceed here"
       
   341 
       
   342     <context: #return>
       
   343     <exception: #raise>
       
   344 
       
   345     |val|
       
   346 
       
   347     aHandlerBlock argumentCount == 0 ifTrue:[
       
   348         "/ 0-arg handler - not interested in the ex - object
       
   349         val := aHandlerBlock value
       
   350     ] ifFalse:[
       
   351         "/ 1-arg handler - pass myself as exception argument
       
   352         val := aHandlerBlock value:self.
       
   353     ].
       
   354 
       
   355     "handler fall through - is just like a #proceedWith:(aHandlerBlock value)"
       
   356 
       
   357     self proceedWith:val
       
   358 ! !
       
   359 
       
   360 !Notification methodsFor:'queries'!
   333 !Notification methodsFor:'queries'!
   361 
   334 
   362 query
   335 query
   363     "notice the implementation on the class-side: if no additional parameters are to be passed,
   336     "notice the implementation on the class-side: if no additional parameters are to be passed,
   364      we do not even arrive here, because query has inlined the raiseRequest code"
   337      we do not even arrive here, because query has inlined the raiseRequest code"
   373 ! !
   346 ! !
   374 
   347 
   375 !Notification class methodsFor:'documentation'!
   348 !Notification class methodsFor:'documentation'!
   376 
   349 
   377 version
   350 version
   378     ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.30 2013-05-27 14:12:02 stefan Exp $'
   351     ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.31 2013-08-22 12:33:44 cg Exp $'
   379 !
   352 !
   380 
   353 
   381 version_CVS
   354 version_CVS
   382     ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.30 2013-05-27 14:12:02 stefan Exp $'
   355     ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.31 2013-08-22 12:33:44 cg Exp $'
   383 ! !
   356 ! !
   384 
   357 
   385 
   358 
   386 Notification initialize!
   359 Notification initialize!