diff -r a2c74eca6bf2 -r e23359f62023 objdictgen/nodemanager.py --- a/objdictgen/nodemanager.py Fri Aug 07 15:59:35 2009 +0200 +++ b/objdictgen/nodemanager.py Tue Sep 15 10:47:38 2009 +0200 @@ -744,9 +744,11 @@ value = dic[value] if editor == "raccess" and not node.IsMappingEntry(index): entry_infos = self.GetEntryInfos(index) + subIndex0_infos = self.GetSubentryInfos(index, 0, False).copy() + subIndex1_infos = self.GetSubentryInfos(index, 1, False).copy() node.AddMappingEntry(index, name = entry_infos["name"], struct = 7) - node.AddMappingEntry(index, 0, values = self.GetSubentryInfos(index, 0, False).copy()) - node.AddMappingEntry(index, 1, values = self.GetSubentryInfos(index, 1, False).copy()) + node.AddMappingEntry(index, 0, values = subIndex0_infos) + node.AddMappingEntry(index, 1, values = subIndex1_infos) node.SetMappingEntry(index, subIndex, values = {name : value}) if not disable_buffer: self.BufferCurrentNode() @@ -1131,23 +1133,23 @@ else: return None, None - def GetEntryName(self, index): - if self.CurrentNode: - return self.CurrentNode.GetEntryName(index) - else: - return FindEntryName(index, MappingDictionary) - - def GetEntryInfos(self, index): - if self.CurrentNode: - return self.CurrentNode.GetEntryInfos(index) - else: - return FindEntryInfos(index, MappingDictionary) - - def GetSubentryInfos(self, index, subindex): - if self.CurrentNode: - return self.CurrentNode.GetSubentryInfos(index, subindex) - else: - result = FindSubentryInfos(index, subindex, MappingDictionary) + def GetEntryName(self, index, compute=True): + if self.CurrentNode: + return self.CurrentNode.GetEntryName(index, compute) + else: + return FindEntryName(index, MappingDictionary, compute) + + def GetEntryInfos(self, index, compute=True): + if self.CurrentNode: + return self.CurrentNode.GetEntryInfos(index, compute) + else: + return FindEntryInfos(index, MappingDictionary, compute) + + def GetSubentryInfos(self, index, subindex, compute=True): + if self.CurrentNode: + return self.CurrentNode.GetSubentryInfos(index, subindex, compute) + else: + result = FindSubentryInfos(index, subindex, MappingDictionary, compute) if result: result["user_defined"] = False return result @@ -1170,9 +1172,9 @@ else: return FindTypeDefaultValue(typeindex, MappingDictionary) - def GetMapVariableList(self): - if self.CurrentNode: - return self.CurrentNode.GetMapVariableList() + def GetMapVariableList(self, compute=True): + if self.CurrentNode: + return self.CurrentNode.GetMapVariableList(compute) else: return []