[BUG][Q] Form saving and reloading
Bob Arning
arning at charm.net
Wed Apr 24 15:52:01 UTC 2002
On Wed, 24 Apr 2002 11:45:53 -0400 (EDT) Yisrael Lowenstein <gte356h at prism.gatech.edu> wrote:
>Form fromBinaryStream:
>has this test in it when loading saved forms:
>
> firstByte = 2 ifTrue: [
> "new Squeak form format"
> ^ self new readFrom: aBinaryStream].
>
>The problem is that form writeOn: doesn't put a 2 as the first byte --
>therefore, you can not read in a Form that you wrote out!
>
>This is easy enough to fix (just "binaryStream nextPut: 2" before you
>"writeOn: binaryStream")...but I was thinking there was probably a reason
>this was being done this way...anyone know?
The 2 gets written by DisplayObject>>writeOnFileNamed:, e.g.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|