Storing objects in a binary file

Nicolas Petton petton.nicolas at gmail.com
Sun Feb 3 22:38:00 UTC 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080203/732e1edd/attachment.pgp


More information about the Squeak-dev mailing list