Storing objects in a binary file

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

Storing objects in a binary file

Nicolas Petton
Hi,

I'm using FileStream>>fileOutClass:andObject: to store objects in binary
files. It doesn't works in my case, because of blockContexts, if I don't
use ImageSegment:

storeDataOn: aDataStream
        "Contexts are not allowed go to out in DataStreams.  They must be
included inside an ImageSegment."

        aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream].

        self error: 'This Context was not included in the ImageSegment'.
                "or perhaps ImageSegments were not used at all"
        ^ nil


Do someone know if there is another way to do that ?

Cheers!

Nicolas

--
Nicolas Petton
http://nico.bioskop.fr
            ___
          ooooooo
         OOOOOOOOO
        |Smalltalk|
         OOOOOOOOO
          ooooooo
           \   /
            [|]
--------------------------------
Ma clé PGP est disponible ici :
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D



signature.asc (196 bytes) Download Attachment