eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Dolphin::DeafObject':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DeafObject (in Dolphin)


Inheritance:

   Object
   |
   +--Singleton
      |
      +--Dolphin::DeafObject

Package:
stx:libcompat
Category:
Compatibility-Dolphin
Version:
rev: 1.3 date: 2014/08/01 12:52:52
user: stefan
file: Dolphin__DeafObject.st directory: libcompat
module: stx stc-classLibrary: libcompat

Description:


DeafObject is a singleton class whose sole instance is deaf to all requests - 
i.e. it appears to understand all messages, but takes no action except to answer itself. 
This ensures that the results of all message sends to the DeafObject are also deaf. 
DeafObject can be useful for avoiding a proliferation of #isNil tests.

N.B. DeafObject cannot be used to substitute for any object which has special significance 
to either the Compiler or the VM, a good example being <Boolean>s. 
The following expression will raise a 'Must be boolean' error because it is not a true message send:

DeafObject current ifTrue: []

Class Variables:
    Current         <DeafObject>. Singleton instance.


Class protocol:

accessing
o  current
Answer the singleton <DeafObject>.


Instance protocol:

comparing
o  = comparand
Answer whether the receiver and the <Object>, comparand,
are considered equivalent (in whatever respect is appropriate for
the class of the receiver). All DeafObjects are considered equal.

exceptions
o  doesNotUnderstand: aMessage
The receiver is deaf to all requests. Answer self to ensure that
our answers are also deaf.

o  mustBeBoolean
Private - Sent to the receiver by the VM when an attempt was made to test it
for its boolean status by a CompiledMethod.
Note that it is normally necessary for implementors of #mustBeBoolean to return a
boolean value, or not return at all. If a non-boolean value is returned, then it
in turn will be sent a #mustBeBoolean message too. This could potentially continue
indefinitely, causing an unbreakable loop.



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 20 Apr 2024 01:40:43 GMT