![]() Squeak Smalltalk : Persistency : ![]() Smart Ref Stream |
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: Writing: file := FileStream newFileNamed: 'data.obj'. file fileOutClass: nil "no class" andObject: data. Reading: file := FileStream readOnlyFileNamed: 'data.obj'. data := file fileInObjectAndCode.