[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer/src PropertyEditor.py TemplateBas...
From: |
Jason Cater |
Subject: |
gnue/designer/src PropertyEditor.py TemplateBas... |
Date: |
Wed, 04 Jul 2001 17:30:55 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/07/04 17:30:55
Modified files:
designer/src : PropertyEditor.py TemplateBase.py
Log message:
Added GTypecasts to gnue.common for typecasting xml data; misc other
changes
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/PropertyEditor.py.diff?cvsroot=OldCVS&tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/TemplateBase.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gnue/designer/src/PropertyEditor.py
diff -u gnue/designer/src/PropertyEditor.py:1.9
gnue/designer/src/PropertyEditor.py:1.10
--- gnue/designer/src/PropertyEditor.py:1.9 Wed Jun 27 22:38:06 2001
+++ gnue/designer/src/PropertyEditor.py Wed Jul 4 17:30:55 2001
@@ -30,7 +30,7 @@
import sys, os, time, string
from wxPython.wx import *
from wxPython.grid import *
-from gnue.common import GDebug, GConfig, GParser
+from gnue.common import GDebug, GConfig, GTypecast
from gnue.forms import GFForm, GFInstance, GFParser, GFObjects, GFTrigger,
GFLibrary, UIwxpython
from GFDesigner import *
from Incubator import elements
@@ -78,15 +78,16 @@
if self.attributes[key].has_key('ValueSet'):
self.grid.SetCellEditor(i, 0,
RestrictedCellEditor(self.attributes[key]))
- elif self.attributes[key]['Typecast'] == GParser.bool:
+ elif self.attributes[key]['Typecast'] == GTypecast.boolean:
self.grid.SetCellEditor(i, 0, BoolCellEditor(self.attributes[key]))
- elif self.attributes[key]['Typecast'] == int:
+ elif self.attributes[key]['Typecast'] in (GTypecast.integer,
+ GTypecast.number, GTypecast.whole):
self.grid.SetCellEditor(i, 0, IntCellEditor(self.attributes[key]))
else:
self.grid.SetCellEditor(i, 0, CharCellEditor(self.attributes[key]))
if hasattr(object, key):
- if self.attributes[key]['Typecast'] == GParser.bool:
+ if self.attributes[key]['Typecast'] == GTypecast.boolean:
if object.__dict__[key]:
self.grid.SetCellValue(i,0,"TRUE")
else:
Index: gnue/designer/src/TemplateBase.py
diff -u gnue/designer/src/TemplateBase.py:1.4
gnue/designer/src/TemplateBase.py:1.5
--- gnue/designer/src/TemplateBase.py:1.4 Wed Jun 27 19:26:19 2001
+++ gnue/designer/src/TemplateBase.py Wed Jul 4 17:30:55 2001
@@ -45,7 +45,7 @@
# in lower case, as many "Xyz Wizards" (proper name) have
# been trademarked. (No, I'm not kidding :)
-from gnue.common import GParser
+from gnue.common import GTypecast
from gnue.forms import GFParser
import Incubator
@@ -166,8 +166,13 @@
self.variables = variables
-boolean = GParser.bool
-char = GParser.char
+# Available field types
+boolean = GTypecast.boolean
+text = GTypecast.text
+number = GTypecast.number
+whole = GTypecast.whole
+integer = GTypecast.integer
+name = GTypecast.name
class WizardItem:
@@ -178,7 +183,7 @@
self.text = text
class WizardInput (WizardItem):
- def __init__(self, variable, label, typecast=char,
+ def __init__(self, variable, label, typecast=text,
set=None, size=10, lowerbound=None, upperbound=None,
forceupper=0, forcelower=0, required=0):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer/src PropertyEditor.py TemplateBas...,
Jason Cater <=