eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ValueModel':



Class: ValueModel



rev: 1.41 date: 2023/01/06 10:42:44
user: cg
file: ValueModel.st directory: libview2
module: stx stc-classLibrary: libview2


abstract superclass for ValueHolders and Adaptors.
It does not itself know how and where the value is stored,
but knows about interested objects (which get informed, whenever
the value changes) and keeps track if the value was ever accepted.

    this class was implemented using protocol information
    from alpha testers - it may not be complete or compatible to
    the corresponding ST-80 class. 
    If you encounter any incompatibilities, please forward a note 
    describing the incompatibility verbal (i.e. no code) to the ST/X team.

subclasses must redefine: #setValue: and #value
(and optionally redefine #value:)


COPYRIGHT (c) 1995 by Claus Gittinger All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

instance creation
o  new
(comment from inherited method)
return an instance of myself without indexed variables

o  newWithDependent: aDependent
ValueHolder newWithDependent:[self halt].

o  isAbstract
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.

Instance protocol:

o  setValue: newValue
physically set my value, without change notifications

** This method must be redefined in concrete classes (subclassResponsibility) **

o  triggerValue: newValue
set my value & send change notifications to my dependents.
Send the change message even if the value didn't change.

o  value
return my value

** This method must be redefined in concrete classes (subclassResponsibility) **

o  value: newValue
set my value & send change notifications to my dependents
if it changed.

o  value: newValue withoutNotifying: someOne
like #value, but temporarily retract all interests for someOne
(i.e. the value-change will NOT directly send ANY change notification
to someOne; we cannot guarantee indirect notifications, though.)
Useful if someone is itself depending on the receiver,
and wants to avoid recursive update notifications.

o  asValue
return the receiver - it is already a valueHolder

o  compute: aBlock
return a BlockValue on the receiver, which computes aBlock

o  inspectorValueListIconFor: anInspector
( an extension from the stx:libtool package )
returns the icon to be shown alongside the value list of an inspector

o  decrement
decrement my value

o  increment
increment my value

o  isBuffering
return true, if the receiver is buffering something.
For compatibility with BufferedValueHolder, false is returned here

o  isPluggableAdaptor

o  isTypeConverter

o  isValueModel
return true, if the receiver is some kind of valueModel;
true returned here - redefined from Object

ST/X; WebServer 1.702 at 20f6060372b9.unknown:8081; Thu, 30 May 2024 08:55:35 GMT