diff orpg/gametree/nodehandlers/rpg_grid.py @ 18:97265586402b ornery-orc

Traipse 'OpenRPG' {090827-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: Update Manager is now in version 0.8. While not every button works, users can now browse the different revisions and their different changesets. The code has been refined some with feature from Core added to it. A Crash report is now created if the users software crashes. Update Manager has been moved to the Traipse Suite menu item, and a Debug Console as been added as well.
author sirebral
date Thu, 27 Aug 2009 01:04:43 -0500
parents 4385a7d0efd1
children 51428d30c59e
line wrap: on
line diff
--- a/orpg/gametree/nodehandlers/rpg_grid.py	Thu Aug 13 13:14:10 2009 -0500
+++ b/orpg/gametree/nodehandlers/rpg_grid.py	Thu Aug 27 01:04:43 2009 -0500
@@ -29,7 +29,8 @@
 __version__ = "$Id: rpg_grid.py,v 1.20 2006/11/15 12:11:24 digitalxero Exp $"
 
 from core import *
-from forms import *
+from forms import *
+from orpg.minidom import Element, Text
 
 class rpg_grid_handler(node_handler):
     """ Node handler for rpg grid tool
@@ -196,12 +197,12 @@
         self._tc.SetDimensions(rect.x+1, rect.y+1, rect.width+2, rect.height+2)
 
 
-    def Show(self, show, attr):
-        """
-        Show or hide the edit control.  You can use the attr (if not None)
-        to set colours or fonts for the control.
-        """
-        self.base_Show(show, attr)
+    #def Show(self, show, attr): #deprecated DeprecationWarning: Please use PyGridCellEditor.Show instead.
+    #    """
+    #    Show or hide the edit control.  You can use the attr (if not None)
+    #    to set colours or fonts for the control.
+    #    """
+    #    self.base_Show(show, attr) # Removed to prevent recursive error type.
 
 
     def BeginEdit(self, row, col, grid):
@@ -283,7 +284,6 @@
             evt.Skip()
 
 
-
     def Destroy(self):
         """final cleanup"""
         self.base_Destroy()
@@ -341,7 +341,6 @@
         value = self.GetCellValue(row,col)
         cells = self.rows[row].getElementsByTagName('cell')
         t_node = cells[col]._get_firstChild()
-        print t_node
         t_node._set_nodeValue(value)
         if col == 0:
             self.handler.refresh_rows()
@@ -362,7 +361,7 @@
             if t_node == None:
                 #doc = cells[i].ownerDocument
                 #t_node = doc.createTextNode("")
-                t_node = minidom.Text("")
+                t_node = Text("")
                 t_node = cells[i].appendChild(t_node)
             self.SetCellValue(rowi,i,t_node._get_nodeValue())
 
@@ -370,12 +369,12 @@
         cols = self.GetNumberCols()
         #doc = self.handler.grid.ownerDocument
         #row = doc.createElement('row')
-        row = minidom.Element('row')
+        row = Element('row')
         for i in range(0,cols):
             #cell = doc.createElement('cell')
-            cell = minidom.Element('cell')
+            cell = Element('cell')
             #t_node = doc.createTextNode("")
-            t_node = minidom.Text("")
+            t_node = Text("")
             t_node = cell.appendChild(t_node)
             row.appendChild(cell)
         self.handler.grid.appendChild(row)
@@ -387,9 +386,9 @@
         #doc = self.handler.grid.ownerDocument
         for r in self.rows:
             #cell = doc.createElement('cell')
-            cell = minidom.Element('cell')
+            cell = Element('cell')
             #t_node = doc.createTextNode("")
-            t_node = minidom.Text("")
+            t_node = Text("")
             t_node = cell.appendChild(t_node)
             r.appendChild(cell)
         self.AppendCols(1)