|
Class: ValueModel
Object
|
+--Model
|
+--ValueModel
|
+--BlockValue
|
+--IndirectValue
|
+--PluggableAdaptor
|
+--ProtocolAdaptor
|
+--ValueHolder
- Package:
- stx:libview2
- Category:
- Interface-Support-Models
- Version:
- 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.
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:)
copyrightCOPYRIGHT (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.
instance creation
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
-
newWithDependent: aDependent
-
ValueHolder newWithDependent:[self halt].
queries
-
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.
accessing
-
setValue: newValue
-
physically set my value, without change notifications
** This method must be redefined in concrete classes (subclassResponsibility) **
-
triggerValue: newValue
-
set my value & send change notifications to my dependents.
Send the change message even if the value didn't change.
-
value
-
return my value
** This method must be redefined in concrete classes (subclassResponsibility) **
-
value: newValue
-
set my value & send change notifications to my dependents
if it changed.
-
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
-
asValue
-
return the receiver - it is already a valueHolder
-
compute: aBlock
-
return a BlockValue on the receiver, which computes aBlock
inspecting
-
inspectorValueListIconFor: anInspector
( an extension from the stx:libtool package )
-
returns the icon to be shown alongside the value list of an inspector
misc
-
decrement
-
decrement my value
-
increment
-
increment my value
queries
-
isBuffering
-
return true, if the receiver is buffering something.
For compatibility with BufferedValueHolder, false is returned here
testing
-
isPluggableAdaptor
-
-
isTypeConverter
-
-
isValueModel
-
return true, if the receiver is some kind of valueModel;
true returned here - redefined from Object
|