dabo Commit
Revision 6820
Date: 2011-09-02 15:02:30 -0700 (Fri, 02 Sep 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6820
Changed:
U trunk/dabo/lib/eventMixin.py
Log:
Recommented on the __raisedEvents list, so we aren't tempted to remove it again
in the future, as it is actually catching duplicate events.
Diff:
Modified: trunk/dabo/lib/eventMixin.py
===================================================================
--- trunk/dabo/lib/eventMixin.py 2011-09-02 21:53:27 UTC (rev 6819)
+++ trunk/dabo/lib/eventMixin.py 2011-09-02 22:02:30 UTC (rev 6820)
@@ -49,8 +49,9 @@
# Instantiate the event, no matter if there aren't any
bindings: the event
# did happen, after all, and perhaps we want to log that fact.
- # self.__raisedEvents keeps track of a possible problem
identified by
- # Vladimir. It is debug code that isn't intended to stick
around.
+ # self.__raisedEvents keeps track of the event being raised, to
check against
+ # handling the same event twice, resulting from one of the
event handlers causing
+ # the event to happen again recursively.
try:
self.__raisedEvents
except AttributeError:
@@ -58,11 +59,10 @@
eventSig = (eventClass, args, kwargs)
if eventSig in self.__raisedEvents:
- # The event has already been called, for reasons we
don't understand.
- # Just return and do nothing.
+ # The event is already being handled, but one of the
handlers caused it to be
+ # raised again.
return None
- else:
- self.__raisedEvents.append(eventSig)
+ self.__raisedEvents.append(eventSig)
eventData = None
if "eventData" in kwargs:
_______________________________________________
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]