--- a/Boolean.st Mon Apr 22 12:56:16 1996 +0200
+++ b/Boolean.st Mon Apr 22 13:03:32 1996 +0200
@@ -11,10 +11,10 @@
"
Object subclass:#Boolean
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Kernel-Objects'
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Kernel-Objects'
!
!Boolean class methodsFor:'documentation'!
@@ -79,11 +79,13 @@
!Boolean methodsFor:'converting'!
literalArrayEncoding
- "encode myself as an array literal."
+ "encode myself as an array literal, from which a copy of the receiver
+ can be reconstructed with #decodeAsLiteralArray."
^ self
"Modified: 5.9.1995 / 22:46:57 / claus"
+ "Modified: 22.4.1996 / 13:00:05 / cg"
! !
!Boolean methodsFor:'copying'!
@@ -158,5 +160,5 @@
!Boolean class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Boolean.st,v 1.17 1996-03-23 17:20:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Boolean.st,v 1.18 1996-04-22 11:01:34 cg Exp $'
! !
--- a/Number.st Mon Apr 22 12:56:16 1996 +0200
+++ b/Number.st Mon Apr 22 13:03:32 1996 +0200
@@ -283,11 +283,13 @@
!
literalArrayEncoding
- "encode myself as an array literal."
+ "encode myself as an array literal, from which a copy of the receiver
+ can be reconstructed with #decodeAsLiteralArray."
^ self
"Modified: 1.9.1995 / 02:25:26 / claus"
+ "Modified: 22.4.1996 / 13:00:27 / cg"
!
radiansToDegrees
@@ -450,5 +452,5 @@
!Number class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.29 1996-04-18 09:53:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.30 1996-04-22 11:02:34 cg Exp $'
! !
--- a/Point.st Mon Apr 22 12:56:16 1996 +0200
+++ b/Point.st Mon Apr 22 13:03:32 1996 +0200
@@ -11,10 +11,10 @@
"
ArithmeticValue subclass:#Point
- instanceVariableNames:'x y'
- classVariableNames:'PointZero PointOne'
- poolDictionaries:''
- category:'Graphics-Geometry'
+ instanceVariableNames:'x y'
+ classVariableNames:'PointZero PointOne'
+ poolDictionaries:''
+ category:'Graphics-Geometry'
!
!Point class methodsFor:'documentation'!
@@ -372,13 +372,14 @@
!
literalArrayEncoding
- "encode myself as an array.
+ "encode myself as an array, from which a copy of the receiver
+ can be reconstructed with #decodeAsLiteralArray.
The encoding is: (Point xValue yValue)"
^ Array
- with:#Point
- with:x
- with:y
+ with:#Point
+ with:x
+ with:y
"
@@ -387,6 +388,7 @@
"
"Modified: 1.9.1995 / 02:18:29 / claus"
+ "Modified: 22.4.1996 / 13:00:32 / cg"
!
rectangleRelativeTo:aRectangle preferred:prefRect
@@ -853,6 +855,6 @@
!Point class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.32 1996-04-02 22:04:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.33 1996-04-22 11:02:48 cg Exp $'
! !
Point initialize!
--- a/Rectangle.st Mon Apr 22 12:56:16 1996 +0200
+++ b/Rectangle.st Mon Apr 22 13:03:32 1996 +0200
@@ -578,15 +578,16 @@
!
literalArrayEncoding
- "encode myself as an array.
+ "encode myself as an array, from which a copy of the receiver
+ can be reconstructed with #decodeAsLiteralArray.
The encoding is: (Rectangle orgX orgY cornX cornY)"
^ Array
- with:#Rectangle
- with:left
- with:top
- with:width
- with:height
+ with:#Rectangle
+ with:left
+ with:top
+ with:width
+ with:height
"
@@ -595,6 +596,7 @@
"
"Modified: 1.9.1995 / 02:16:54 / claus"
+ "Modified: 22.4.1996 / 13:00:36 / cg"
!
rectangleRelativeTo:aRectangle preferred:prefRect
@@ -1297,5 +1299,5 @@
!Rectangle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.35 1996-04-10 20:15:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.36 1996-04-22 11:03:02 cg Exp $'
! !
--- a/SeqColl.st Mon Apr 22 12:56:16 1996 +0200
+++ b/SeqColl.st Mon Apr 22 13:03:32 1996 +0200
@@ -693,11 +693,15 @@
!
decodeAsLiteralArray
+ "given a literalEncoding in the receiver,
+ create & return the corresponding object.
+ The inverse operation to #literalArrayEncoding."
+
|cls|
cls := Smalltalk at:(self first) ifAbsent:nil.
cls isNil ifTrue:[
- ^ self error:'unknown class in spec:' , self first.
+ ^ self error:'unknown class in spec:' , self first.
].
^ cls new fromLiteralArrayEncoding:self.
@@ -705,16 +709,23 @@
#(Point 10 20) decodeAsLiteralArray
#(Rectangle 100 200 400 500) decodeAsLiteralArray
"
+
+ "Modified: 22.4.1996 / 12:59:03 / cg"
!
literalArrayEncoding
+ "encode myself as an array literal, from which a copy of the receiver
+ can be reconstructed with #decodeAsLiteralArray."
+
^ (self collect:[:el | el literalArrayEncoding]) asArray
"
(Array with:(Color red:50 green:50 blue:50)
- with:(1 @ 2)
+ with:(1 @ 2)
) literalArrayEncoding
"
+
+ "Modified: 22.4.1996 / 13:00:56 / cg"
! !
!SequenceableCollection methodsFor:'copying'!
@@ -2534,5 +2545,5 @@
!SequenceableCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.54 1996-04-16 11:50:01 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.55 1996-04-22 11:03:32 cg Exp $'
! !
--- a/SequenceableCollection.st Mon Apr 22 12:56:16 1996 +0200
+++ b/SequenceableCollection.st Mon Apr 22 13:03:32 1996 +0200
@@ -693,11 +693,15 @@
!
decodeAsLiteralArray
+ "given a literalEncoding in the receiver,
+ create & return the corresponding object.
+ The inverse operation to #literalArrayEncoding."
+
|cls|
cls := Smalltalk at:(self first) ifAbsent:nil.
cls isNil ifTrue:[
- ^ self error:'unknown class in spec:' , self first.
+ ^ self error:'unknown class in spec:' , self first.
].
^ cls new fromLiteralArrayEncoding:self.
@@ -705,16 +709,23 @@
#(Point 10 20) decodeAsLiteralArray
#(Rectangle 100 200 400 500) decodeAsLiteralArray
"
+
+ "Modified: 22.4.1996 / 12:59:03 / cg"
!
literalArrayEncoding
+ "encode myself as an array literal, from which a copy of the receiver
+ can be reconstructed with #decodeAsLiteralArray."
+
^ (self collect:[:el | el literalArrayEncoding]) asArray
"
(Array with:(Color red:50 green:50 blue:50)
- with:(1 @ 2)
+ with:(1 @ 2)
) literalArrayEncoding
"
+
+ "Modified: 22.4.1996 / 13:00:56 / cg"
! !
!SequenceableCollection methodsFor:'copying'!
@@ -2534,5 +2545,5 @@
!SequenceableCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.54 1996-04-16 11:50:01 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.55 1996-04-22 11:03:32 cg Exp $'
! !