IBM Smalltalk User's Guide

Storing versions of objects in object stores

You use the methods described in this section to share objects between every edition of an application.

Each application and subapplication in a library has a common object store in which you can deposit named versions of objects. Because these objects have edition time stamps, you can retrieve a specific edition at any time. In order to use these features, load the configuration map LibraryObjectStorage into your image.

Unlike user fields, every new edition of a specific named object is accessible to every edition of an application. References to inherited user fields are copied when new editions are created; thus, any change to a field from a previous edition of a component is not visible to any other edition of the component.

The methods (implemented in SubApplication) you use include the following:

allObjectNames
Answers all the names of objects in the receiver's object store.

atObjectNamed: aName put: anObject
Stores anObject in the receiver's object store using the key aName. Answers the timeStamp for the new edition.

latestObjectNamed: aName
Answers the latest edition of the object with the given name.

objectNamed: aName at: aTimeStamp
Answers the edition of the object named aName whose timestamp is aTimeStamp. Answers nil if it is missing.

objectNamed: aName at: aTimeStamp ifAbsent: aBlock
Answers the edition of the object named aName whose timestamp is aTimeStamp. If the object was not found, answers the result of evaluating aBlock.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]