Mercurial > traipse_dev
diff orpg/gametree/nodehandlers/forms.py @ 66:c54768cffbd4 ornery-dev
Traipse Dev 'OpenRPG' {090818-00}
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:
*Unstable*
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(). This version has known bugs, specifically with the gametree and nodes. I think the XML files where not removed during testing of Core and switching back.
author | sirebral |
---|---|
date | Tue, 18 Aug 2009 06:33:37 -0500 |
parents | 4385a7d0efd1 |
children | 449a8900f9ac |
line wrap: on
line diff
--- a/orpg/gametree/nodehandlers/forms.py Mon Aug 17 06:56:31 2009 -0500 +++ b/orpg/gametree/nodehandlers/forms.py Tue Aug 18 06:33:37 2009 -0500 @@ -209,9 +209,9 @@ </nodehandler> """ def __init__(self,xml_dom,tree_node): - node_handler.__init__(self,xml_dom,tree_node) + node_handler.__init__(self,xml_dom,tree_node) self.text_elem = self.master_dom.getElementsByTagName('text')[0] - self.text = safe_get_text_node(self.text_elem) + self.text = component.get('xml').safe_get_text_node(self.text_elem) if self.text_elem.getAttribute("send_button") == "": self.text_elem.setAttribute("send_button","0") if self.text_elem.getAttribute("raw_mode") == "": @@ -410,7 +410,7 @@ def __init__(self,xml_dom,tree_node): node_handler.__init__(self,xml_dom,tree_node) self.list = self.master_dom.getElementsByTagName('list')[0] - self.options = self.list.getElementsByTagName('option') + self.options = self.list.getElementsByTagName('option') if self.list.getAttribute("send_button") == "": self.list.setAttribute("send_button","0") if self.list.getAttribute("hide_title") == "": @@ -448,7 +448,7 @@ def get_selected_text(self): node = self.get_selected_node() if node: - return safe_get_text_node(node)._get_nodeValue() + return component.get('xml').safe_get_text_node(node)._get_nodeValue() else: return "" @@ -466,7 +466,7 @@ opts = [] for opt in self.options: if opt.getAttribute("selected") == "1": - opts.append(safe_get_text_node(opt)._get_nodeValue()) + opts.append(component.get('xml').safe_get_text_node(opt)._get_nodeValue()) return opts def get_selections_index(self): @@ -494,11 +494,11 @@ def get_options(self): opts = [] for opt in self.options: - opts.append(safe_get_text_node(opt)._get_nodeValue()) + opts.append(component.get('xml').safe_get_text_node(opt)._get_nodeValue()) return opts def get_option(self,index): - return safe_get_text_node(self.options[index])._get_nodeValue() + return component.get('xml').safe_get_text_node(self.options[index])._get_nodeValue() def add_option(self,opt): elem = minidom.Element('option') @@ -514,7 +514,7 @@ self.options = self.list.getElementsByTagName('option') def edit_option(self,index,value): - safe_get_text_node(self.options[index])._set_nodeValue(value) + component.get('xml').safe_get_text_node(self.options[index])._set_nodeValue(value) def has_send_button(self): if self.list.getAttribute("send_button") == '0':