eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Model':

Home

everywhere
www.exept.de
for:
[back]

Class: Model


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
      |
      +--GraphColumn
      |
      +--HTTPServerSettingsAppl::PluggableServicesSettingsAppl::AvailableServiceItem
      |
      +--Plug
      |
      +--SelectionInHierarchy
      |
      +--SelectionInTree
      |
      +--TabItem
      |
      +--TabulatorSpecification
      |
      +--ValueModel

Package:
stx:libview2
Category:
Interface-Support-Models
Version:
rev: 1.39 date: 2009/05/14 19:58:40
user: cg
file: Model.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Claus Gittinger

Description:


Models are things which represent information models, i.e. something
which holds the data for user interface components and on which these operate.
Basically, instances keep track of which components depend on them and 
inform the dependents of any changes.

The Model class itself is abstract and not too useful, see subclasses,
especially, ValueHolder and SelectionInList.

Notice:
  Actually the Model class is not really needed; since the dependency
  mechanism is inherited by Object, you can take any object as a model.
  However, instances of Model (and subclasses) keep the dependents locally
  in an instance variable; thus speeding up access a bit.

[Instance variables:]
    dependents      <Collection>    those objects which depend on me.
                                    To save some storage, a single dependent 
                                    is kept directly here.
                                    Otherwise, if there are multiple dependents,
                                    a collection of dependents is held here.


Related information:

    ValueHolder
    SelectionInList
    [introduction to view programming]

Instance protocol:

converting
o  skippedInLiteralEncoding
return a Collection with elements which are skipped in the encoding

copying
o  postCopy
release dependents after copying

o  postDeepCopy
release dependents after copying

o  skipInstvarIndexInDeepCopy: index
a helper for deepCopy; only indices for which this method returns
false are copied in a deep copy.

dependents access
o  addDependent: anObject
make the argument, anObject be a dependent of the receiver

o  dependents
return a Collection of dependents

o  dependents: aCollection
set the collection of dependents

o  dependentsDo: aBlock
evaluate aBlock for all of my dependents

o  release
remove all dependencies from the receiver

o  removeDependent: anObject
make the argument, anObject be independent of the receiver

dependents access (non weak)
o  addNonWeakDependent: anObject
make the argument, anObject be a dependent of the receiver.
Since all dependencies are nonWeak in Model, this is simply
forwarded to addDependent:

o  interests
return a Collection of interests - empty if there is none.
Here, we use the normal dependents collection for interests.

o  nonWeakDependents
return a Collection of dependents - empty if there is none.
Since all dependencies are nonWeak in Model, this is a dummy.

o  removeNonWeakDependent: anObject
make the argument, anObject be independent of the receiver.
Since all dependencies are nonWeak in Model, this is simply
forwarded to removeDependent:



ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 21:19:01 GMT