Catch encoding of Blocks.
--- a/AbstractObjectCoder.st Tue Sep 10 15:03:51 2002 +0200
+++ b/AbstractObjectCoder.st Tue Sep 10 15:50:35 2002 +0200
@@ -62,6 +62,13 @@
self encodeSequenceableCollection:aBitArray with:aParameter
!
+encodeBlock:aBlock with:aParameter
+ "encoding of blocks is rather difficult and an error by default.
+ If your encoder supports this, redefine it there"
+
+ self error:'encoding of blocks is not supported'
+!
+
encodeBoolean:aBoolean with:aParameter
"encode a Boolean"
@@ -261,5 +268,5 @@
!AbstractObjectCoder class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/AbstractObjectCoder.st,v 1.6 2002-09-10 12:50:14 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/AbstractObjectCoder.st,v 1.7 2002-09-10 13:50:24 stefan Exp $'
! !
--- a/Block.st Tue Sep 10 15:03:51 2002 +0200
+++ b/Block.st Tue Sep 10 15:50:35 2002 +0200
@@ -600,6 +600,13 @@
"Created: / 31.3.1998 / 15:46:17 / cg"
! !
+!Block methodsFor:'encoding'!
+
+encodeOn:anEncoder with:aParameter
+
+ ^ anEncoder encodeBlock:self with:aParameter
+! !
+
!Block methodsFor:'error handling'!
invalidCodeObject
@@ -1907,6 +1914,6 @@
!Block class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.121 2002-07-24 19:20:33 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.122 2002-09-10 13:50:35 stefan Exp $'
! !
Block initialize!