Writing Flash Morphs on a SmartRefStream on a RWBinaryOrTextStream

Wouter Gazendam wouter at cosmocows.com
Mon Oct 2 14:28:33 UTC 2000


Hi All,

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 reset.
	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.

Thanks,

Wouter Gazendam





More information about the Squeak-dev mailing list