SmartRefStream broken?

Andreas Raab andreas.raab at
Tue Nov 14 22:02:00 UTC 2006

Benjamin Pollack wrote:
> Is there a reason why SmartRefStream has such a radically different 
> interface than ReferenceStream, even though it's a direct subclass?

Yes. The reason is that you shouldn't use SmartRefStream the way you're 
using it. The "correct" way is using #fileOutClass:andObject: like here:

   file := FileStream newFileNamed: 'data.obj'.
   file fileOutClass: nil "no class" andObject: data.

   file := FileStream readOnlyFileNamed: 'data.obj'.
   data := file fileInObjectAndCode.

   - Andreas

More information about the Squeak-dev mailing list