1486 #print debug_tick, debug_vars |
1486 #print debug_tick, debug_vars |
1487 self.IECdebug_lock.acquire() |
1487 self.IECdebug_lock.acquire() |
1488 if debug_vars is not None and \ |
1488 if debug_vars is not None and \ |
1489 len(debug_vars) == len(self.TracedIECPath): |
1489 len(debug_vars) == len(self.TracedIECPath): |
1490 for IECPath,value in zip(self.TracedIECPath, debug_vars): |
1490 for IECPath,value in zip(self.TracedIECPath, debug_vars): |
1491 data_tuple = self.IECdebug_datas.get(IECPath, None) |
1491 if value is not None: |
1492 if data_tuple is not None: |
1492 data_tuple = self.IECdebug_datas.get(IECPath, None) |
1493 WeakCallableDict, data_log, status = data_tuple |
1493 if data_tuple is not None: |
1494 data_log.append((debug_tick, value)) |
1494 WeakCallableDict, data_log, status = data_tuple |
1495 for weakcallable,(args,kwargs) in WeakCallableDict.iteritems(): |
1495 data_log.append((debug_tick, value)) |
1496 # delegate call to wx event loop |
1496 for weakcallable,(args,kwargs) in WeakCallableDict.iteritems(): |
1497 #print weakcallable, value, args, kwargs |
1497 # delegate call to wx event loop |
1498 if getattr(weakcallable, "SetValue", None) is not None: |
1498 #print weakcallable, value, args, kwargs |
1499 wx.CallAfter(weakcallable.SetValue, value, *args, **kwargs) |
1499 if getattr(weakcallable, "SetValue", None) is not None: |
1500 elif getattr(weakcallable, "AddPoint", None) is not None: |
1500 wx.CallAfter(weakcallable.SetValue, value, *args, **kwargs) |
1501 wx.CallAfter(weakcallable.AddPoint, debug_tick, value, *args, **kwargs) |
1501 elif getattr(weakcallable, "AddPoint", None) is not None: |
1502 # This will block thread if more than one call is waiting |
1502 wx.CallAfter(weakcallable.AddPoint, debug_tick, value, *args, **kwargs) |
|
1503 # This will block thread if more than one call is waiting |
1503 elif debug_vars is not None: |
1504 elif debug_vars is not None: |
1504 wx.CallAfter(self.logger.write_warning, |
1505 wx.CallAfter(self.logger.write_warning, |
1505 "Debug data not coherent %d != %d\n"%(len(debug_vars), len(self.TracedIECPath))) |
1506 "Debug data not coherent %d != %d\n"%(len(debug_vars), len(self.TracedIECPath))) |
1506 elif debug_tick == -1: |
1507 elif debug_tick == -1: |
1507 #wx.CallAfter(self.logger.write, "Debugger unavailable\n") |
1508 #wx.CallAfter(self.logger.write, "Debugger unavailable\n") |