Adding support for Graphic for variable in Debug mode
authorlbessard
Wed, 14 Jan 2009 19:44:36 +0100
changeset 292 a47081eb6cec
parent 291 701c0601db02
child 293 b9ec99fab9fc
Adding support for Graphic for variable in Debug mode
plugger.py
--- a/plugger.py	Wed Jan 14 19:25:53 2009 +0100
+++ b/plugger.py	Wed Jan 14 19:44:36 2009 +0100
@@ -1458,7 +1458,10 @@
                         for weakcallable,(args,kwargs) in WeakCallableDict.iteritems():
                             # delegate call to wx event loop
                             #print weakcallable, value, args, kwargs
-                            wx.CallAfter(weakcallable.SetValue, value, *args, **kwargs)
+                            if getattr(weakcallable, "SetValue", None) is not None:
+                                wx.CallAfter(weakcallable.SetValue, value, *args, **kwargs)
+                            elif getattr(weakcallable, "AddPoint", None) is not None:
+                                wx.CallAfter(weakcallable.AddPoint, debug_tick, value, *args, **kwargs)
                             # This will block thread if more than one call is waiting
             elif debug_vars is not None:
                 wx.CallAfter(self.logger.write_warning,