dabo Commit
Revision 6757
Date: 2011-08-08 11:40:41 -0700 (Mon, 08 Aug 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6757

Changed:
U   trunk/dabo/lib/eventMixin.py

Log:
Removed more unused code from eventMixin.


Diff:
Modified: trunk/dabo/lib/eventMixin.py
===================================================================
--- trunk/dabo/lib/eventMixin.py        2011-08-08 18:31:10 UTC (rev 6756)
+++ trunk/dabo/lib/eventMixin.py        2011-08-08 18:40:41 UTC (rev 6757)
@@ -29,15 +29,12 @@
                        raise TypeError("Sequence expected.")
 
 
-       def raiseEvent(self, eventClass, uiEvent=None, uiCallAfterFunc=None,
-                       *args, **kwargs):
+       def raiseEvent(self, eventClass, uiEvent=None, *args, **kwargs):
                """
                Send the event to all registered listeners.
 
                If uiEvent is sent, dEvents.Event will be able to parse it for 
useful
-               information to send along to the callback. If uiCallAfterFunc 
is sent, the
-               callbacks will be wrapped in that function so that the UI-lib 
can process
-               our Dabo events at next idle instead of immediately in this 
event cycle.
+               information to send along to the callback. 
 
                Additional arguments, if any, are sent along to the constructor 
of the
                event. While this feature exists so that UI-lib event handlers 
can pass
@@ -45,8 +42,7 @@
                code may pass along additional arguments as well, which will 
exist in the
                event.EventData dictionary property.
 
-               User code need not worry too much about all these extra 
arguments, as in
-               most cases they'll be completely unnecessary. Just call 
raiseEvent() with
+               In most cases, user code should call raiseEvent() with
                the event class (dEvents.Hit, for example) as the only 
parameter.
                """
 
@@ -73,24 +69,7 @@
                for binding in bindings:
                        bindingClass, bindingFunction = binding[0], binding[1]
                        if bindingClass == eventClass:
-                               if uiCallAfterFunc:
-                                       # Use the native-UI's way to have the 
callback processed during
-                                       # the next event idle cycle.
-                                       uiCallAfterFunc(bindingFunction, event)
-                               else:
-                                       bindingFunction(event)
-                                       # Previously, we were printing any 
raised exception and then
-                                       # letting it go, which just seems 
wrong. Commented out:
-
-                                       # Wrap the call so that if an exception 
is raised in one
-                                       # handler, the rest of the handlers 
still get a whack at
-                                       # the event. This matches the behavior 
as if we were using
-                                       # the real event loop in the ui lib. 
This is only necessary
-                                       # because we aren't using a 
uiCallAfterFunc().
-                                       #try:
-                                       #       bindingFunction(event)
-                                       #except:
-                                       #       traceback.print_exc()
+                               bindingFunction(event)
                        if not event.Continue:
                                # The event handler set the Continue flag to 
False, specifying that
                                # no more event handlers should process the 
event.



_______________________________________________
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]

Reply via email to