Table of Contents

Class: Model | Twisted-0.19.0/twisted/python/mvc.py
--- | ---
A Model which keeps track of views which are looking at it in order to notify them when the model changes.
Methods |
--- | ---
__eq__ __init__ __ne__ addSubview addView initialize notify removeView
| __eq__
    __eq__ ( self,  other )
| __init__
    __init__ (
            self,
            *args,
            *kwargs,
            )
| __ne__
    __ne__ ( self,  other )
| addSubview
    addSubview (
            self,
            name,
            subview,
            )
| addView
    addView ( self,  view )
Add a view for the model to keep track of.
| initialize
    initialize (
            self,
            *args,
            *kwargs,
            )
Hook for subclasses to initialize themselves without having to mess with the __init__ chain.
| notify
    notify ( self,  changed=None )
Notify all views that something was changed on me. Passing a dictionary of {'attribute': 'new value'} in changed will pass this dictionary to the view for increased performance. If you don't want to do this, don't, and just use the traditional MVC paradigm of querying the model for things you're interested in.
| removeView
    removeView ( self,  view )
Remove a view that the model no longer should keep track of.

Table of Contents

This document was automatically generated on Sun Jul 14 19:53:11 2002 by HappyDoc version 2.0