diff orpg/gametree/nodehandlers/core.py @ 227:81d0bfd5e800 alpha

Traipse Alpha 'OpenRPG' {100612-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 (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 03:50:37 -0500
parents 12ba14d30baa
children
line wrap: on
line diff
--- a/orpg/gametree/nodehandlers/core.py	Fri Jan 15 22:45:51 2010 -0600
+++ b/orpg/gametree/nodehandlers/core.py	Sat Jun 12 03:50:37 2010 -0500
@@ -21,14 +21,15 @@
 # Author: Chris Davis
 # Maintainer:
 # Version:
-#   $Id: core.py,v 1.49 2007/12/07 20:39:48 digitalxero Exp $
+#   $Id: core.py,v Traipse 'Ornery-Orc' prof.ebral Exp $
 #
 # Description: The file contains code for the core nodehanlers
 #
 
-__version__ = "$Id: core.py,v 1.49 2007/12/07 20:39:48 digitalxero Exp $"
+__version__ = "$Id: core.py,v Traipse 'Ornery-Orc' prof.ebral Exp $"
 
 from nodehandler_version import NODEHANDLER_VERSION
+from orpg.tools.InterParse import Parse
 
 try:
     from orpg.orpg_windows import *
@@ -54,7 +55,6 @@
         self.xml = xml
         self.mytree_node = tree_node
         self.tree = component.get('tree')
-        #self.tree = component.get('tree_fs')
         self.frame = component.get('frame')
         self.chat = component.get('chat')
         self.drag = True
@@ -282,7 +282,7 @@
     def get_html_panel(self,parent):
         html_str = "<html><body bgcolor=\"#FFFFFF\" >"+self.tohtml()+"</body></html>"
         wnd = wx.html.HtmlWindow(parent,-1)
-        html_str = self.chat.ParseDice(html_str)
+        html_str = Parse.Dice(html_str)
         wnd.SetPage(html_str)
         return wnd
 
@@ -345,6 +345,7 @@
             if bad_txt_found:
                 wx.MessageBox("Some non 7-bit ASCII characters found and stripped","Warning!")
             txt = u_txt
+            print txt, self.handler, self.handler.xml
             self.handler.text._set_nodeValue(txt)
 
 
@@ -386,7 +387,8 @@
 
     def on_ldclick(self,evt):
         file_name = self.file_node.get("name")
-        self.tree.insert_xml(open(orpg.dirpath.dir_struct["nodes"] + file_name,"r").read())
+        try: self.tree.insert_xml(open(orpg.dirpath.dir_struct["nodes"] + file_name,"r").read())
+        except: wx.MessageBox('Invalid File', 'Error')
         return 1
 
     def on_design(self,evt):