<HTML>
<HEAD>
<TITLE>Re: [Cuis] serialization in Cuis</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'>As Juan said, ReferenceStream is your friend<BR>
Here I attach a old cs<BR>
If you wish , Foo saveOnFileNamed: 'Foo'create a Foo.obj file in your working directory.<BR>
Later you could use readAndInspect: 'Path to your file'<BR>
When you have DrgaAndDrop as my forked CuiSantafesino you could exchange working objects between Squeak,Cuis and Pharo.<BR>
And if you said Pharo do not have ReferenceStream , well I made how to for Pharo 2.0 so is possible.<BR>
With this technique I export and import objects big enough for have complete swiki into a Squeak derivate image, about 14 mb of data<BR>
Cheers<BR>
<BR>
Edgar<BR>
@morplenauta<BR>
<BR>
<BR>
<BR>
<BR>
On 11/6/15, 3:48 PM, "Juan Vuletich" <juan@jvuletich.org> wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> Hi Nacho,<BR>
<BR>
Oh, yes, I misread. Ok. ReferenceStream and SmartRefStream are your choices. Take a look at the class comments, play with the examples. Ask questions.<BR>
<BR>
Cheers,<BR>
Juan Vuletich<BR>
<BR>
<BR>
On 11/6/2015 3:42 PM, Ignacio Sniechowski wrote: <BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>Hi Juan,<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>Thanks for your response.<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>I’m not trying to serialize classes but instances of them.<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>Suppose theres a class called Memo with an ivar “content”<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>Then I want to be able add to the instances the posibility of storing their data.<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>fileOut is great for classes I use it a lot!<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>But I want a way to preserve data outside the image, so it can be loaded when a new image is used.<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>thanks!<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>Nacho<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'><BR>
<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
<BR>
<BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>-- <BR>
Ignacio Sniechowski<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:10pt'>Prosavic SRL<BR>
Sent with Airmail<BR>
</SPAN></FONT><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
<BR>
<BR>
<BR>
On November 6, 2015 at 3:13:25 PM, Juan Vuletich (<FONT COLOR="#0000FF"><U>juan@jvuletich.org</U></FONT>) wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
<BR>
Hi Nacho, <BR>
<BR>
On 11/1/2015 11:45 PM, nacho wrote: <BR>
> Hi Folks, <BR>
> I'm trying to add support for serializing instances of a class. <BR>
> I'm looking at System-Object Storage <BR>
> And in particular to the class SmartRefStream which seems to add that <BR>
> functionality. However, the class has no comments and no examples. <BR>
> Is there some example which uses this class? a short demo? an example? <BR>
> Thanks in advance!! <BR>
> best <BR>
> Nacho <BR>
> <BR>
<BR>
Are we browsing the same system? SmartRefStream class comment is 6016 <BR>
characters here. Superclass ReferenceStream has a class comments of 2875 <BR>
characters. DataStream and ReferenceStream have class methods that start <BR>
with 'example'. Looking for references to these classes also brings <BR>
useful examples of usage. <BR>
<BR>
In any case, the usual way to serialize classes is fileOut. Why doesn't <BR>
this work for you? What problem are you trying to solve? <BR>
<BR>
Cheers, <BR>
Juan Vuletich <BR>
<BR>
<BR>
<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT></FONT></BLOCKQUOTE></BLOCKQUOTE>
</BODY>
</HTML>