Object behavior
As noted above, all CLDT classes (indeed, all classes in VA Smalltalk), are required to support the basic Object behavior described in the sections that follow.
Basic dependents mechanism
addDependent:, broadcast:, broadcast:with:, changed, changed:, dependents, release, removeDependent:, update:
Note:
For details on the dependents mechanism see Chapter 14 of the Blue Book. The dependents mechanism is really a legacy from earlier Smalltalk graphics implementations. It was used to force updates in cases where several windows provided views on the same object or several closely related objects. It is no longer used in modern GUI systems like Common Graphics and Common Widgets. Consequently, we have included only the basic protocol in CLDT.
Porting tip:
All Smalltalk dialects use the same basic messages to implement the dependents mechanism, with one exception: Smalltalk/V does not support removeDependent:. Both Smalltalk/V and Objectworks\Smalltalk provide a number of additional (and different) messages that extend the basic mechanism.
Behavior testing
class, isKindOf:, isMemberOf:, isNil, notNil, respondsTo:
Class identity testing
isArray, isAssociation, isBehavior, isBlock, isByteArray, isCharacter, isClass, isCollection, isDBString, isDictionary, isFloat, isFraction, isInteger, isMetaclass, isNumber, isPoint, isSBString, isString, isSymbol
Porting tip:
The class identity testing messages are all short (and often performance-optimized) forms of:
self class = {NameOfClass}
self isKindOf: {NameOfClass}
 
Each Smalltalk dialect has its own list of short forms; the choices are usually driven by implementation details. Smalltalk/V has a large number of such methods, while Objectworks\Smalltalk uses only a few. In CLDT we have chosen a middle course. Note that Smalltalk/V uses the spelling MetaClass rather than the Blue Book spelling Metaclass, which is used in CLDT and Objectworks\Smalltalk.
Converting
 
asString
Copying
copy
Note:
Unlike other Smalltalk implementations, CLDT does not provide a public default version of either deepCopy or shallowCopy in Object protocol. The semantics of both these messages are normally specific to each class, and often to an application.
Printing and storing
printOn:, printString, storeOn:, storeString
Performing
perform:, perform:with:, perform:with:with:, perform:with:with:with:, perform:withArguments:
Porting tip:
You should avoid using these methods, if possible, because they adversely affect the packaging process. Refer to the guidelines in the packaging materials of Smalltalk User Guide for more information.
Error handling
doesNotUnderstand:, error:, primitiveFailed, halt, halt:, shouldNotImplement, subclassResponsibility
Porting tip:
These methods provide only the most basic error handling. Smalltalk/V uses implementedBySubclass in place of the Blue Book method subclassResponsibility, and does not support shouldNotImplement or halt:. All Smalltalk dialects provide additional error handling methods that are system- and operating system-specific.
Primitive accessing
basicSize
Mutating
become:
Porting tip:
The exact semantics of become: (and Array>>multiBecome:) are not consistent across different Smalltalk platforms, particularly in the use of the two-way become (in which the receiver and argument actually switch identities) and the one-way become (in which the receiver is de-referenced and garbage collected). VA Smalltalk uses a one-way become. See the Blue Book for more complete information on become:.
Testing object equality or identity
=, ==, hash, identityHash, yourself
Last modified date: 07/27/2020