Update of /cvsroot/openrpg/openrpg1/orpg/chat
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4450/orpg/chat
Modified Files:
Tag: BRANCH-1-7-1
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.161.2.3
retrieving revision 1.161.2.4
diff -C2 -d -r1.161.2.3 -r1.161.2.4
*** chatwnd.py 18 Apr 2007 21:54:54 -0000 1.161.2.3
--- chatwnd.py 19 Apr 2007 02:47:55 -0000 1.161.2.4
***************
*** 2248,2252 ****
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)):
--- 2248,2252 ----
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)):
***************
*** 2376,2380 ****
return rs
! def resolve_loop(self, dom, nodeName):
self.log.log("Enter chat_panel->resolve_loop(self, dom, nodeName)", ORPG_DEBUG)
--- 2376,2380 ----
return rs
! def resolve_loop(self, dom, nodeName, doLoop = False):
self.log.log("Enter chat_panel->resolve_loop(self, dom, nodeName)", ORPG_DEBUG)
***************
*** 2383,2386 ****
--- 2383,2391 ----
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
***************
*** 2410,2413 ****
--- 2415,2426 ----
dom = node.getChildren()
+ print found
+ 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')
|