logo       

Re: Exporting Object Memory: msg#00078

lang.smalltalk.squeak.beginners

Subject: Re: Exporting Object Memory




El 12/17/07 12:57 PM, "Chris Cunnington" <cunnington@xxxxxxxxxxxx> escribió:

> If I had data in object memory, because I've saved answers from a user into
> objects, then can I file out that information? If I had to send it to
> somebody as an csv file, how could I do that easily?

To Herbert and David advice I add:

You could export any object as

anObject saveOnFile (you could inspect any object and do self saveOnFile
from inside Inspector)

And read again

| inputStream anObject |
inputStream _ FileStream oldFileNamed: 'Preferences.obj'. (I use this for
have Peferences in MinimalMorphic "
anObject _ inputStream fileInObjectAndCode.
inputStream close.

But for this, the original .image and the target .image should be
compatible, for complicated objects like Morphs.

You can't save from 3.10 and read back on 3.9 , as example.

You should play safe with same version Squeak.

Edgar


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise