[squeak-dev] Help with ImageSegments
Herbert König
herbertkoenig at gmx.net
Fri May 1 16:32:18 UTC 2009
Hello Brent,
BP> I would like to use image segments in 3.9.
BP> I need to export a tree of objects to a file and then load
BP> the segment into a different image.
never tried across different Versions but a short example:
writing:
writeTrainingsSamples
"write the class var TrainingsSamples to a file using ReferenceStreams"
| rr |
rr := ReferenceStream fileNamed: 'trainingssamples.obj'.
rr nextPut: TrainingsSamplesFehlerkategorien trainingsSamples .
rr close.
rr := nil
reading:
readTrainingsSamples
"read the class var TrainingsSamples from a file using ReferenceStreams "
| rr |
rr := ReferenceStream fileNamed: 'trainingssamples.obj'.
TrainingsSamplesFehlerkategorien trainingsSamples: rr next.
rr close.
rr := nil
hth,
Herbert mailto:herbertkoenig at gmx.net
More information about the Squeak-dev
mailing list
|