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.35 date: 2017/02/10 10:24:25
user: cg
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

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.1.0.0; WebServer 1.663 at exept.de:8081; Tue, 16 Oct 2018 18:27:24 GMT