From: Digital X. <dig...@us...> - 2007-04-19 02:51:46
|
Update of /cvsroot/openrpg/openrpg1/orpg/chat In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6008/orpg/chat Modified Files: chatwnd.py Log Message: Added a 2nd check for node referencing to use the old method of first properly named thread if the node with the specified path cannot be found Index: chatwnd.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/chat/chatwnd.py,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** chatwnd.py 14 Apr 2007 22:35:15 -0000 1.167 --- chatwnd.py 19 Apr 2007 02:51:45 -0000 1.168 *************** *** 2285,2289 **** cur_loc = 0 #[a-zA-Z0-9 _\-\.] ! reg = re.compile("(!@([a-zA-Z0-9 _\-\.]+(:{0,2}[a-zA-Z0-9 _\-\.]*)+)@!)") matches = reg.findall(s) for i in xrange(0,len(matches)): --- 2285,2289 ---- cur_loc = 0 #[a-zA-Z0-9 _\-\.] ! reg = re.compile("(!@([a-zA-Z0-9 _\-\./]+(::[a-zA-Z0-9 _\-\./]+)*)@!)") matches = reg.findall(s) for i in xrange(0,len(matches)): *************** *** 2413,2417 **** return rs ! def resolve_loop(self, dom, nodeName): self.log.log("Enter chat_panel->resolve_loop(self, dom, nodeName)", ORPG_DEBUG) --- 2413,2417 ---- return rs ! def resolve_loop(self, dom, nodeName, doLoop = False): self.log.log("Enter chat_panel->resolve_loop(self, dom, nodeName)", ORPG_DEBUG) *************** *** 2420,2423 **** --- 2420,2428 ---- continue + if doLoop and node.getAttribute('class') != 'textctrl_handler' and node.hasChildNodes(): + (found, node) = self.resolve_loop(node.getChildren(), nodeName, doLoop) + if not found: + continue + if node.getAttribute('name') != nodeName: continue *************** *** 2447,2450 **** --- 2452,2462 ---- dom = node.getChildren() + if not found: + for nodeName in node_path_list: + (found, node) = self.resolve_loop(dom, nodeName, True) + if not found: + break + dom = node.getChildren() + if found: text = node.getElementsByTagName('text') |