vrml.olist

Observable list class

Classes

class OList( list ):
List sub-class which generates pydispatch events on changes
Generates 4 types of events:
  • NEW_CHILD_EVT, from self, with value=child, for each added child
  • NEW_PARENT_EVT, from child, with parent=self, for each added child
  • DEL_CHILD_EVT, from self, with value=child, for each removed child
  • DEL_PARENT_EVT, from child, with parent=self, for each removed child
Note that the OList semantics are a little loose currently, as it sometimes acts as though adding a new duplicate child is not an event and sometimes acts as though it is. This doesn't cause problems for the OpenGLContext scenegraph.
The OList is intended for situations where slow-write-fast-read is the primary requirement, it allows you to hook writing events in order to recalculate/cache values.