Problems with SmartRefStream

Germán S. Arduino gsa at softhome.net
Sun Nov 7 12:15:50 UTC 2004


I haven't time to see all your example now, but I can tell you that some 
time ago I was in trouble using SmartRefStream in a 3.7 image. The same code 
without modifications worked ok in a 3.6 image.

Regards.


"Albert Sacks" <gtg913h at mail.gatech.edu> escribió en el mensaje 
news:00E8F408-3041-11D9-94FC-000A956742C2 at mail.gatech.edu...
> I'm having trouble with SmartRefStream. I created the following class:
>
> Object subclass: #Test
> instanceVariableNames: 'Bar Foo '
> classVariableNames: ''
> poolDictionaries: ''
> category: 'ALTEST'!
>
> !Test methodsFor: 'as yet unclassified' stamp: 'AWS 11/6/2004 16:27'!
> bar
> ^ Bar! !
>
> !Test methodsFor: 'as yet unclassified' stamp: 'AWS 11/6/2004 16:27'!
> foo
> ^Foo! !
>
> !Test methodsFor: 'as yet unclassified' stamp: 'AWS 11/6/2004 16:09'!
> input
> "comment stating purpose of message"
>
> | strem |
> strem _ SmartRefStream fileNamed: 'MyModel.obj'.
> Foo _ strem next.
> Bar _ strem next.
> strem close.! !
>
> !Test methodsFor: 'as yet unclassified' stamp: 'AWS 11/6/2004 16:08'!
> output
> "comment stating purpose of message"
>
> | strem |
> strem _ SmartRefStream fileNamed: 'MyModel.obj'.
> strem nextPut: Foo.
> strem nextPut: Bar.
> strem close! !
>
> !Test methodsFor: 'as yet unclassified' stamp: 'AWS 11/6/2004 16:23'!
> setup
> "comment stating purpose of message"
>
> | |
> Foo _ Dictionary new.
> Bar _ Dictionary new.
> Foo at: #Bob put: #Jones.
> Foo at: #O put: Bar.
> Bar at: #Bob put: #Smith.
> Bar at: #O put: Foo.! !
>
> to practice using SmartRefStreams.
> Unfortunately, when I try to use "input" it gives an error. Apparently 
> when the file is loaded,
> the type dictionary is represented as "39" when SmartRefStream checks the 
> type, and
> the RefTypes collection in ReferenceStream doesn't seem to have an element 
> 39.
>
> You can check the error log for yourself with
> FooBar := new Test.
> FooBar setup.
> FooBar output. "works up to here"
> FooBar input. "error here"
>
>
> 






More information about the Squeak-dev mailing list