Object readFrom:( Text fromString:'Hello' ) storeString

You might also have a look at SIXX.  I have not used it for anything big or for 
a long period of time, but no complaints so far, other than the output being 
more verbose than I might like.  Still, it seems to be a good serializer.


________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Hilaire Fernandes 
[[email protected]]
Sent: Sunday, February 13, 2011 10:53 AM
To: [email protected]
Subject: [Pharo-project] how to serialize Text?

I don't understand much the protocole with Text and if it is possible to
serialize it.

I can save a Text in a stream:
|stream|
stream := ReadWriteStream on: String new.
myText storeOn: stream.

But how to use the stream to create a new Text instance:

The stream contents looks like:

Text string: ''absd Hello with me
c'' runs: (RunArray runs: #(5 5 6 2 2 ) values: ((Array new: 5)...

I guess it is a trivial situation but I don't know how to do it

Any clue?


Hilaire

--
Education 0.2 -- http://blog.ofset.org/hilaire



Reply via email to