V'Age compatibility methods
authorClaus Gittinger <cg@exept.de>
Fri, 15 Nov 1996 11:39:34 +0100
changeset 1979 70fcfdbedb98
parent 1978 0d49a096cf06
child 1980 173122fed8e2
V'Age compatibility methods
Block.st
--- a/Block.st	Fri Nov 15 11:35:42 1996 +0100
+++ b/Block.st	Fri Nov 15 11:39:34 1996 +0100
@@ -367,7 +367,7 @@
 %}
 ! !
 
-!Block methodsFor:'STV compatibility'!
+!Block methodsFor:'Compatibility - ST/V'!
 
 on:aSignal do:exceptionBlock
     "added for ST/V compatibility; evaluate the receiver,
@@ -388,6 +388,32 @@
     "
 ! !
 
+!Block methodsFor:'Compatibility - V''Age'!
+
+argumentCount
+    "VisualAge compatibility: alias for #numArgs.
+     return the number of arguments I expect for evaluation"
+
+    ^ nargs
+
+    "Created: 15.11.1996 / 11:22:02 / cg"
+!
+
+valueOnReturnDo:aBlock
+    "VisualAge compatibility: alias for #valueOnUnwindDo:
+     evaluate the receiver - when some method sent within unwinds 
+     (i.e. does a long return), evaluate the argument, aBlock.
+     This is used to make certain that cleanup actions 
+     (for example closing files etc.) are executed regardless of error actions.
+
+     Q: is this the exact semantics of V'Ages method ?
+        the documentation is unclean; it could be a valueNowOrOnUnwindDo: ..."
+
+    ^ self valueOnUnwindDo:aBlock
+
+    "Created: 15.11.1996 / 11:38:37 / cg"
+! !
+
 !Block methodsFor:'accessing'!
 
 home
@@ -1380,6 +1406,6 @@
 !Block class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.64 1996-11-04 22:43:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.65 1996-11-15 10:39:34 cg Exp $'
 ! !
 Block initialize!