Mercurial > traipse_dev
diff orpg/gametree/nodehandlers/dnd3e.py @ 67:c5bc2abaf7f8 ornery-dev
Traipse Dev 'OpenRPG' {090818-01}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary:
*Stable*
This is the first wave of Code Refinement updates. Includes new material from Core Beta; new debugger material (partially implemented), beginnings of switch to etree, TerminalWriter, and a little more. open_rpg has been renamed to component; functioning now as component.get(), component.add(), component.delete().
Fixes nodehandlers to bring the dev back to a stable push. Known issue with a nodehandler and it's sub dialogs.
author | sirebral |
---|---|
date | Tue, 18 Aug 2009 07:34:35 -0500 |
parents | c54768cffbd4 |
children | 449a8900f9ac |
line wrap: on
line diff
--- a/orpg/gametree/nodehandlers/dnd3e.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/gametree/nodehandlers/dnd3e.py Tue Aug 18 07:34:35 2009 -0500 @@ -387,7 +387,7 @@ self.master_dom = handler.master_dom n_list = self.master_dom._get_childNodes() for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) self.sizer.Add(wx.StaticText(self, -1, t_node._get_nodeValue()), 1, wx.EXPAND) self.SetSizer(self.sizer) self.SetAutoLayout(True) @@ -413,7 +413,7 @@ n_list = self.master_dom._get_childNodes() html_str = "<table width=100% border=1 ><tr BGCOLOR=#E9E9E9 ><th>General Information</th></tr><tr><td>" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += "<B>"+n._get_tagName().capitalize() +":</B> " html_str += t_node._get_nodeValue() + ", " html_str = html_str[:len(html_str)-2] + "</td></tr></table>" @@ -427,7 +427,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() class gen_grid(wx.grid.Grid): @@ -462,7 +462,7 @@ #self.AutoSizeColumn(1) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) @@ -488,7 +488,7 @@ n_list = self.master_dom._get_childNodes() html_str = "<table width=100% border=1 ><tr BGCOLOR=#E9E9E9 ><th>General Information</th></tr><tr><td>" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += "<B>"+n._get_tagName().capitalize() +":</B> " html_str += t_node._get_nodeValue() + "<br>" html_str = html_str[:len(html_str)-2] + "</td></tr></table>" @@ -560,12 +560,12 @@ for node in self.n_list: if node._get_tagName() == nodeName: - t_node = safe_get_text_node(node) + t_node = component.get('xml').safe_get_text_node(node) t_node._set_nodeValue(value) def saveMoney(self, row, col): value = self.grid.GetCellValue(row, col) - t_node = safe_get_text_node(self.n_list[row]) + t_node = component.get('xml').safe_get_text_node(self.n_list[row]) t_node._set_nodeValue(value) def on_cell_change(self, evt): @@ -577,7 +577,7 @@ def refresh_row(self, row): - t_node = safe_get_text_node(self.n_list[row]) + t_node = component.get('xml').safe_get_text_node(self.n_list[row]) tagname = self.n_list[row]._get_tagName() value = t_node._get_nodeValue() if tagname == 'Gear':