A Model which keeps track of views which are looking at it in order
to notify them when the model changes.
Methods
|
|
__cmp__
__init__
addView
notify
removeView
|
|
__cmp__
|
__cmp__ ( self, other )
|
|
__init__
|
__init__ ( self )
|
|
addView
|
addView ( self, view )
Add a view for the model to keep track of.
|
|
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.
|
|