Context.st
changeset 15010 1c91c097fd52
parent 14700 4d0c0720fbe8
child 15091 d7ec3bbf1a07
equal deleted inserted replaced
15009:cd08c3e66a57 15010:1c91c097fd52
   820 
   820 
   821     "Created: / 31-03-1998 / 15:51:14 / cg"
   821     "Created: / 31-03-1998 / 15:51:14 / cg"
   822     "Modified: / 21-07-2011 / 13:30:21 / cg"
   822     "Modified: / 21-07-2011 / 13:30:21 / cg"
   823 ! !
   823 ! !
   824 
   824 
       
   825 !Context methodsFor:'enumerating'!
       
   826 
       
   827 withAllSendersDo:aBlock
       
   828     "evaluate aBlock for me and all contexts of my sender chain"
       
   829 
       
   830     |con|
       
   831 
       
   832     con := self.
       
   833     [ con notNil ] whileTrue:[
       
   834         aBlock value:con.
       
   835         con := con sender.
       
   836     ]
       
   837 ! !
       
   838 
   825 !Context methodsFor:'error handling'!
   839 !Context methodsFor:'error handling'!
   826 
   840 
   827 invalidReturn:returnValue
   841 invalidReturn:returnValue
   828     "this message is sent by the VM, when a methods context
   842     "this message is sent by the VM, when a methods context
   829      which has already returned is about to return again.
   843      which has already returned is about to return again.
   920 
   934 
   921 fullPrintAll
   935 fullPrintAll
   922     "print a full walkback starting at the receiver
   936     "print a full walkback starting at the receiver
   923      - used only for MiniDebuggers walkback print"
   937      - used only for MiniDebuggers walkback print"
   924 
   938 
   925     |context|
   939     self withAllSendersDo:[:con | con fullPrint].
   926 
       
   927     context := self.
       
   928     [context notNil] whileTrue: [
       
   929         context fullPrint.
       
   930         context := context sender
       
   931     ]
       
   932 
   940 
   933     "
   941     "
   934      thisContext fullPrintAll
   942      thisContext fullPrintAll
   935     "
   943     "
   936 !
   944 !
  1541 !
  1549 !
  1542 
  1550 
  1543 fullPrintAllOn:aStream
  1551 fullPrintAllOn:aStream
  1544     "print a full walkback (incl arguments) starting at the receiver"
  1552     "print a full walkback (incl arguments) starting at the receiver"
  1545 
  1553 
  1546     |context|
  1554     self withAllSendersDo:[:con | con fullPrintOn:aStream. aStream cr].
  1547 
       
  1548     context := self.
       
  1549     [context notNil] whileTrue: [
       
  1550         context fullPrintOn:aStream.
       
  1551         aStream cr.
       
  1552         context := context sender
       
  1553     ]
       
  1554 
  1555 
  1555     "
  1556     "
  1556      thisContext fullPrintAllOn:Transcript
  1557      thisContext fullPrintAllOn:Transcript
  1557     "
  1558     "
  1558 
  1559 
  1641 !
  1642 !
  1642 
  1643 
  1643 printAllOn:aStream
  1644 printAllOn:aStream
  1644     "print a brief walkback (excl. arguments) starting at the receiver"
  1645     "print a brief walkback (excl. arguments) starting at the receiver"
  1645 
  1646 
  1646     |context|
  1647     self withAllSendersDo:[:con | con printOn:aStream. aStream cr].
  1647 
       
  1648     context := self.
       
  1649     [context notNil] whileTrue: [
       
  1650         context printOn:aStream.
       
  1651         aStream cr.
       
  1652         context := context sender
       
  1653     ]
       
  1654 
  1648 
  1655     "
  1649     "
  1656      thisContext printAllOn:Transcript
  1650      thisContext printAllOn:Transcript
  1657     "
  1651     "
  1658 
  1652 
  2470 ! !
  2464 ! !
  2471 
  2465 
  2472 !Context class methodsFor:'documentation'!
  2466 !Context class methodsFor:'documentation'!
  2473 
  2467 
  2474 version
  2468 version
  2475     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.179 2013-01-24 15:22:59 cg Exp $'
  2469     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.180 2013-03-31 12:26:19 cg Exp $'
  2476 !
  2470 !
  2477 
  2471 
  2478 version_CVS
  2472 version_CVS
  2479     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.179 2013-01-24 15:22:59 cg Exp $'
  2473     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.180 2013-03-31 12:26:19 cg Exp $'
  2480 !
  2474 !
  2481 
  2475 
  2482 version_SVN
  2476 version_SVN
  2483     ^ '§ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1  §'
  2477     ^ '§ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1  §'
  2484 ! !
  2478 ! !