Persistence (was: Hello)

Ned Konz ned at
Fri Apr 25 15:40:53 UTC 2003

On Friday 25 April 2003 08:25 am, I wrote:

> > - What is the best way to save data, e.g. like the notes in a
> > pda? In a collaborative setting? Is there any work on database
> > connectivity?
> The easiest way to save chunks of connected data is probably using
> ImageSegments.

Not necessarily (I'm just waking up). You can use the SmartRefStream 
perhaps a bit easier.

For instance, here's how VMMaker saves its config data:

saveConfigurationTo: aFile
	"write info about the current configuration to a file."
	| fileStream |
	fileStream _ FileStream newFileNamed: aFile.
	fileStream fileOutClass: nil andObject: self configurationInfo

and how it reads the data back:

readConfigurationFrom: aFileName
	"read info about the current configuration from a file. Return the 
array that would have been made by #configurationInfo"
	|  fileStream |

	fileStream _ FileStream oldFileNamed: aFileName.
	^fileStream fileInObjectAndCode

Ned Konz

More information about the Squeak-dev mailing list