[BUG] [FIX] MatrixTransformStreamWriting

Ned Konz ned at bike-nomad.com
Fri May 18 00:37:56 UTC 2001


On Thursday 17 May 2001 17:41, Joshua Channing Gargus wrote:
> A fix that lets MatrixTransform2x3s write themselves on reference streams. 
> Also gets rid of a redundant bit of code in ArrayedCollection.
>
> Yay!  Projects with TTSampleStringMorphs can now be saved!
>
> Joshua

I posted a fix for this back in March; did you see it? Maybe I missed 
something, but it works for me (I used it for storing my ConnectorsDemo, 
which used TTSampleStringMorphs).

'From Squeak3.1alpha of 7 March 2001 [latest update: #3848] on 28 March 2001 
at 1:39:10 pm'!
"Change Set:            MatrixTransformStoreOnFix-nk
Date:                   28 March 2001
Author:                 Ned Konz

This allows MatrixTransform2x3 (and TTSampleStringMorph)
instances to be stored on and read from a stream."!


!MatrixTransform2x3 methodsFor: 'storing' stamp: 'nk 3/28/2001 13:26'!
writeOn: aByteStream

        (WordArrayForSegment withAll: self) writeOn: aByteStream! !


!MatrixTransform2x3 class methodsFor: 'instance creation' stamp: 'nk 
3/28/2001 13:28'!
newFromStream: aByteStream
        | wa newMe |
        wa _ WordArray newFromStream: aByteStream.
        newMe _ self new.
        1 to: 6 do: [ :i | newMe basicAt: i put: (wa at: i) ].
        ^newMe! !


-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list