saving / loading simple objects
Eric Scharff
Eric.Scharff at Colorado.EDU
Tue Mar 20 05:01:35 UTC 2001
On Mon, 19 Mar 2001, Bob Arning wrote:
> > | inFile |
> > inFile _ (FileStream fileNamed: 'simple2.st').
> > allComments _ inFile fileInObjectAndCode.
> > inFile close.
> >
> >Is there a "right" way to do this? Is there some better technique for
> >this problem that I should probably adopt?
>
> Eric,
>
> Can you tell us why this feels weird? You have a file that contains the serial representation of some object(s); you read it in and have your object(s) back. What bothers you about that?
I guess it was the "AndCode" part I didn't get. I'm filing out the
object, not the "source code" for the object (at least I think that's what
I'm doing.) What does "and code" mean? So I guess it's just a vocabulary
mismatch for me.
Since this works, I'll simply add this concept to my worldview. I'm happy
to learn new things. :)
And it was sure easier than doing it in Java. :)
-Eric
More information about the Squeak-dev
mailing list
|