Mercurial > traipse_dev
comparison orpg/mapper/whiteboard_msg.py @ 228:24769389a7ba alpha
Traipse Alpha 'OpenRPG' {100612-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 (Preparing to close updates)
New Features:
New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order
Fixes:
Fix to InterParse that was causing an Infernal Loop with Namespace Internal
Fix to XML data, removed old Minidom and switched to Element Tree
Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread
Fix to metaservers.xml file not being created
author | sirebral |
---|---|
date | Sat, 12 Jun 2010 04:38:29 -0500 |
parents | b633f4c64aae |
children |
comparison
equal
deleted
inserted
replaced
225:2c6db2043764 | 228:24769389a7ba |
---|---|
78 self.tagname = "whiteboard" | 78 self.tagname = "whiteboard" |
79 map_element_msg_base.__init__(self,reentrant_lock_object) | 79 map_element_msg_base.__init__(self,reentrant_lock_object) |
80 | 80 |
81 def init_from_dom(self,xml_dom): | 81 def init_from_dom(self,xml_dom): |
82 self.p_lock.acquire() | 82 self.p_lock.acquire() |
83 if xml_dom.tagName == self.tagname: | 83 if xml_dom.tag == self.tagname: |
84 if xml_dom.getAttributeKeys(): | 84 if xml_dom.keys(): |
85 for k in xml_dom.getAttributeKeys(): self.init_prop(k,xml_dom.getAttribute(k)) | 85 for k in xml_dom.keys(): self.init_prop(k,xml_dom.get(k)) |
86 for c in xml_dom._get_childNodes(): | 86 for c in xml_dom.getchildren(): |
87 item = item_msg(self.p_lock,c._get_nodeName()) | 87 item = item_msg(self.p_lock,c.tag) |
88 try: item.init_from_dom(c) | 88 try: item.init_from_dom(c) |
89 except Exception, e: | 89 except Exception, e: |
90 print e | 90 print e |
91 continue | 91 continue |
92 id = item.get_prop("id") | 92 id = item.get_prop("id") |
103 raise Exception, "Error attempting to initialize a " + self.tagname + " from a non-<" + self.tagname + "/> element in whiteboard" | 103 raise Exception, "Error attempting to initialize a " + self.tagname + " from a non-<" + self.tagname + "/> element in whiteboard" |
104 self.p_lock.release() | 104 self.p_lock.release() |
105 | 105 |
106 def set_from_dom(self,xml_dom): | 106 def set_from_dom(self,xml_dom): |
107 self.p_lock.acquire() | 107 self.p_lock.acquire() |
108 if xml_dom.tagName == self.tagname: | 108 if xml_dom.tag == self.tagname: |
109 if xml_dom.getAttributeKeys(): | 109 if xml_dom.keys(): |
110 for k in xml_dom.getAttributeKeys(): self.set_prop(k,xml_dom.getAttribute(k)) | 110 for k in xml_dom.keys(): self.set_prop(k,xml_dom.get(k)) |
111 for c in xml_dom._get_childNodes(): | 111 for c in xml_dom.getchildren(): |
112 item = item_msg(self.p_lock, c._get_nodeName()) | 112 item = item_msg(self.p_lock, c.tag) |
113 try: item.set_from_dom(c) | 113 try: item.set_from_dom(c) |
114 except Exception, e: | 114 except Exception, e: |
115 print e | 115 print e |
116 continue | 116 continue |
117 id = item.get_prop("id") | 117 id = item.get_prop("id") |