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.5 date: 2023/08/15 08:38:50
user: cg
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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:41:40 GMT