dabo Commit
Revision 6170
Date: 2010-10-26 17:33:41 -0700 (Tue, 26 Oct 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6170
Changed:
U trunk/dabo/lib/eventMixin.py
U trunk/dabo/settings.py
Log:
Jacek observed that the order of firing of bound events was backwards, and that
he felt they should be processed in reverse order. I've been running with this
setting for the past week or so, and see no adverse effects. Please let me know
if this change causes any unusual behavior in your apps.
Diff:
Modified: trunk/dabo/lib/eventMixin.py
===================================================================
--- trunk/dabo/lib/eventMixin.py 2010-10-27 00:31:01 UTC (rev 6169)
+++ trunk/dabo/lib/eventMixin.py 2010-10-27 00:33:41 UTC (rev 6170)
@@ -81,7 +81,11 @@
eventData=eventData, *args, **kwargs)
# Now iterate the bindings, and execute the callbacks:
- for binding in self._EventBindings:
+ if dabo.reverseEventsOrder:
+ bindings = reversed(self._EventBindings)
+ else:
+ bindings = self._EventBindings
+ for binding in bindings:
bindingClass, bindingFunction = binding[0], binding[1]
if bindingClass == eventClass:
if uiCallAfterFunc:
Modified: trunk/dabo/settings.py
===================================================================
--- trunk/dabo/settings.py 2010-10-27 00:31:01 UTC (rev 6169)
+++ trunk/dabo/settings.py 2010-10-27 00:33:41 UTC (rev 6170)
@@ -112,6 +112,12 @@
# Default log file for the dabo.dBug.loggit function
loggitFile = "functionCall.log"
+# Events should be processed from the latest to earliest binding.
+# If you notice that events don't seem to be happening correctly,
+# change this to False to see if that improves things. If so, please
+# report it the Dabo developers.
+reverseEventsOrder = True
+
# Does the UI layer (dForm) eat exceptions from the biz layer
# such as 'invalid row specified' or bizrule violations and
# automatically display an informational message to the user (True),
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]