235 if pdo_mapping == "T": |
235 if pdo_mapping == "T": |
236 dir = "%I" |
236 dir = "%I" |
237 else: |
237 else: |
238 dir = "%Q" |
238 dir = "%Q" |
239 location = "%s%s" % (dir, data_size) + \ |
239 location = "%s%s" % (dir, data_size) + \ |
240 ".".join(map(lambda x:str(x), location + (entry_index, entry_subindex))) |
240 ".".join(map(lambda x: str(x), location + (entry_index, entry_subindex))) |
241 |
241 |
242 data = wx.TextDataObject(str((location, "location", data_type, var_name, "", access))) |
242 data = wx.TextDataObject(str((location, "location", data_type, var_name, "", access))) |
243 dragSource = wx.DropSource(self.VariablesGrid) |
243 dragSource = wx.DropSource(self.VariablesGrid) |
244 dragSource.SetData(data) |
244 dragSource.SetData(data) |
245 dragSource.DoDragDrop() |
245 dragSource.DoDragDrop() |
993 var_type = self.Controler.GetSlaveVariableDataType( |
993 var_type = self.Controler.GetSlaveVariableDataType( |
994 *self.ProcessVariablesTable.GetValueByName(row, "ReadFrom")) |
994 *self.ProcessVariablesTable.GetValueByName(row, "ReadFrom")) |
995 data_size = self.Controler.GetSizeOfType(var_type) |
995 data_size = self.Controler.GetSizeOfType(var_type) |
996 number = self.ProcessVariablesTable.GetValueByName(row, "Number") |
996 number = self.ProcessVariablesTable.GetValueByName(row, "Number") |
997 location = "%%M%s" % data_size + \ |
997 location = "%%M%s" % data_size + \ |
998 ".".join(map(lambda x:str(x), self.Controler.GetCurrentLocation() + (number,))) |
998 ".".join(map(lambda x: str(x), self.Controler.GetCurrentLocation() + (number,))) |
999 |
999 |
1000 data = wx.TextDataObject(str((location, "location", var_type, var_name, ""))) |
1000 data = wx.TextDataObject(str((location, "location", var_type, var_name, ""))) |
1001 dragSource = wx.DropSource(self.ProcessVariablesGrid) |
1001 dragSource = wx.DropSource(self.ProcessVariablesGrid) |
1002 dragSource.SetData(data) |
1002 dragSource.SetData(data) |
1003 dragSource.DoDragDrop() |
1003 dragSource.DoDragDrop() |