Writing Flash Morphs on a SmartRefStream on a RWBinaryOrTextStream
wouter at cosmocows.com
Mon Oct 2 14:28:33 UTC 2000
I seem to have a problem writing FlashMorphs to a RWBinaryOrTextStream.
Writing to a file works:
| outputStream inputStream |
outputStream := FileStream newFileNamed: ('test' asFileName).
outputStream fileOutClass: nil andObject: MyFlashMorph.
inputStream := FileStream fileNamed: ('test' asFileName).
inputStream fileInObjectAndCode openInWorld
But when I replace the FileStream with a RWBinaryOrTextStream:
| stream |
stream := RWBinaryOrTextStream on: (ByteArray new).
stream fileOutClass: nil andObject: MyFlashMorph.
stream fileInObjectAndCode openInWorld
The thingy results an error: 'Error: Expected start of object, but found 0'
I thought the RWBinaryOrTextStream was interchangeable with the FileStream.
Any help/suggestions/rants would be welcome.
More information about the Squeak-dev