how to serialize Text?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to serialize Text?

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: how to serialize Text?

Schwab,Wilhelm K

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: [hidden email] [[hidden email]] On Behalf Of Hilaire Fernandes [[hidden email]]
Sent: Sunday, February 13, 2011 10:53 AM
To: [hidden email]
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