eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ValueModel':

Home

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

Class: ValueModel


Inheritance:

   Object
   |
   +--Model
      |
      +--ValueModel
         |
         +--BlockValue
         |
         +--IndirectValue
         |
         +--PluggableAdaptor
         |
         +--ProtocolAdaptor
         |
         +--ValueHolder

Package:
stx:libview2
Category:
Interface-Support-Models
Version:
rev: 1.36 date: 2018/12/05 17:25:12
user: stefan
file: ValueModel.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Claus Gittinger

Description:


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.

Notice: 
    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:)


Class protocol:

instance creation
o  new

queries
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:

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

** This method raises an error - it must be redefined in concrete classes **

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 raises an error - it must be redefined in concrete classes **

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.

converting
o  asValue
return the receiver - it is already a valueHolder

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

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

misc
o  deccrement

o  increment

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

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



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 23 Apr 2024 16:12:29 GMT