Domain

Domain is the basic managed object for Ponder2 that supports hierarchies. View it like a directory or a folder in a filesystem

Factory Messages

create

creates a new Domain managed object

Operational Messages

asHash

Returns a hash containing all the entries in the domain.

at: aName

answers the P2Object of the Managed Object at aName. Answers NIL if the object does not exist.

at: aName ifAbsent: aBlock

Answer the P2Object associated with aName. If not found evaluate aBlock (with no arguments) and return its result

at: aName put: p2Object

add anOid into the domain with aName. Answers anOid.

collate: aBlock

Calls aBlock with name/value pairs for each entry in the domain. Answers with an array with all the answers from the executions

do: aBlock

Calls aBlock with name/value pairs for each entry in the domain. Answers with the the receiver

listNames

answers an array containing the names of all the domain's entries.

listObjects

answers an array of Managed Object names containing all the entries in the domain.

remove: aName

Removes aName and its P2ManagedObject from the domain. Answers the oid. TODO Error checks?

resolve: aPath

Answers with the object from aPath relative to this domain