Part of vmc.contrib.gtkmvc.observer View In Hierarchy
Known subclasses: vmc.contrib.gtkmvc.controller.Controller
Method | __init__ | When parameter spurious is set to False |
Method | register_model | Undocumented |
Method | accepts_spurious_change | Returns True if this observer is interested in receiving |
Method | unregister_model | Undocumented |
Method | __del__ | Undocumented |
Method | get_model | Undocumented |
When parameter spurious is set to False (default value) the observer declares that it is not interested in receiving value-change notifications when property's value does not really change. This happens when a property got assigned to a value that is the same it had before being assigned.
A notification was used to be sent to the observer even in this particular condition, because spurious (non-changing) assignments were used as signals when signals were not supported by early version of the framework. The observer was in charge of deciding what to do with spurious assignments, by checking if the old and new values were different at the beginning of the notification code. With latest version providing new notification types like signals, this requirement seems to be no longer needed, and delivering a notification is no longer a sensible behaviour.
This is the reason for providing parameter spurious that changes the previous behaviour but keeps availability of a possible backward compatible feature.