Package horizons :: Package util :: Module changelistener :: Class ChangeListener
[hide private]
[frames] | no frames]

Class ChangeListener

source code

Trivial ChangeListener. The object that changes and the object that listens have to inherit from this class. An object calls _changed every time something has changed, obviously. This function calls every Callback, that has been registered to listen for a change. NOTE: ChangeListeners aren't saved, they have to be reregistered on load NOTE: RemoveListeners must not access the object, as it is in progress of being destroyed.

Instance Methods [hide private]
__init__(self, *args, **kwargs) source code
__init(self) source code
__remove_listener(self, listener_list, listener) source code
__call_listeners(self, listener_list) source code
add_change_listener(self, listener, call_listener_now=False, no_duplicates=False) source code
remove_change_listener(self, listener) source code
has_change_listener(self, listener) source code
discard_change_listener(self, listener)
Remove listener if it's there
source code
Removes all change listeners
source code
Calls every listener when an object changed
source code
add_remove_listener(self, listener, no_duplicates=False)
A listener that listens for removal of the object
source code
remove_remove_listener(self, listener) source code
has_remove_listener(self, listener) source code
discard_remove_listener(self, listener) source code
load(self, db, world_id) source code
remove(self) source code
end(self) source code
Class Variables [hide private]
  log = logging.getLogger('changelistener')