SmartRefStream broken?

Aaron Reichow revaaron at
Tue Nov 14 22:51:56 UTC 2006


On Nov 14, 2006, at 2:47 PM, Jon Hylands wrote:

> The way I use them is this:
> (writing) - same as you do
> (reading)
> 	| file object |
> 	file := FileStream readOnlyFileNamed: 'data.obj'.
> 	object := file fileInObjectAndCode.
> 	file close.
> 	^object

Hrmm... that seems to work fine, #fileInObjectAndCode is actually  
using SmartRefStream.  Seems to be an pretty messy design- the only  
difference is that #fileInObjectAndCode uses:

SmartRefStream on: file contents.

instead of

SmartRefStream fileNamed: ...

Thanks for the pointer, Jon- I don't know if I would've seen that  
otherwise!  It would be easy to fix SmartRefStream, but what is in  
there now is pretty inconsistent... but at least it works, if you say  
the right magic words.


More information about the Squeak-dev mailing list