Class ::xotcl::RecreationClass

::xotcl::RecreationClass[i] create ... \
           [ -instreconfigure (default "1") ] \
           [ -instrecreate instrecreate ] \
           [ -instreinit instreinit ] \
           [ -reconfigure (default "1") ] \
           [ -reinit reinit ]

This meta-class controls the behavior of classes (and optionally their instances), when the classes (or their instances) are overwritten by same named new objects; we call this situation a recreate of an object.

Normally, when files with e.g. class definitions are sourced, the classes and objects are newly defined. When e.g. class definitions exists already in this file, these classes are deleted first before they are newly created. When a class is deleted, the instances of this class are changed into instances of class ::xotcl::Object.

This can be a problem when the class instances are not reloaded and when they should survife the redefinition with the same class relationships. Therefore, we define a meta class RecreationClass, which can be used to parameterize the behavior on redefinitions. Alternatively, Classes or objects could provide their own recreate methods.

Per default, this meta-class handles only the class redefinition case and does only a reconfigure on the class object (in order to get e.g. ad_doc updated).

The following parameters are defined:
  • reconfigure: reconfigure class (default 1)
  • reinit: run init after configure for this class (default unset)
  • instrecreate: handle recreate of class instances (default unset) When this flag is set to 0, instreconfigure and instreinit are ignored.
  • instreconfigure: reconfigure instances of this class (default 1)
  • instreinit: re-init instances of this class (default unset)
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/10-recreation-procs.tcl

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xotcl::Class[i]

Methods (to be applied on the object)

  • recreate (scripted)

Methods (to be applied on instances)

  • instreconfigure (setter)

  • instrecreate (setter)

  • instreinit (setter)

  • reconfigure (setter)

  • recreate (scripted)

  • reinit (setter)