# HG changeset patch # User lbessard # Date 1197300318 -3600 # Node ID 42ab55532da8c776c7c066f253954bb2fdb0d4b4 # Parent 6052c980c3affc4ca3b38a535a4199dba43c4f29 Bug on DCF edition fixed diff -r 6052c980c3af -r 42ab55532da8 objdictgen/networkedit.py --- a/objdictgen/networkedit.py Mon Dec 10 16:08:58 2007 +0100 +++ b/objdictgen/networkedit.py Mon Dec 10 16:25:18 2007 +0100 @@ -858,7 +858,7 @@ def OpenMasterDCFDialog(self, node_id): self.NetworkNodes.SetSelection(0) - self.NetworkNodes.GetPage(0).OpenDCFDIalog(node_id) + self.NetworkNodes.GetPage(0).OpenDCFDialog(node_id) #------------------------------------------------------------------------------- # Exception Handler diff -r 6052c980c3af -r 42ab55532da8 objdictgen/subindextable.py --- a/objdictgen/subindextable.py Mon Dec 10 16:08:58 2007 +0100 +++ b/objdictgen/subindextable.py Mon Dec 10 16:25:18 2007 +0100 @@ -713,10 +713,21 @@ typeinfos = self.Manager.GetEntryInfos(subentry_infos["type"]) if typeinfos: node_id = self.ParentWindow.GetCurrentNodeId() - self.Manager.AddToMasterDCF(node_id, index, subindex, max(1, typeinfos["size"] / 8), int(self.Table.GetValueByName(subindex, "value"), 16)) + value = self.Table.GetValueByName(subindex, "value") + if value == "True": + value = 0 + elif value == "False": + value = 1 + elif value.isdigit(): + value = int(value) + elif value.startswith("0x"): + value = int(value, 16) + else: + value = int(value.encode("hex_codec"), 16) + self.Manager.AddToMasterDCF(node_id, index, subindex, max(1, typeinfos["size"] / 8), value) self.ParentWindow.OpenMasterDCFDialog(node_id) - def OpenDCFDIalog(self, node_id): + def OpenDCFDialog(self, node_id): self.PartList.SetSelection(7) self.RefreshIndexList() self.IndexList.SetSelection(self.ListIndex.index(0x1F22))