[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer TODO src/Designer.py src/Template...
From: |
Jason Cater |
Subject: |
gnue/designer TODO src/Designer.py src/Template... |
Date: |
Mon, 22 Jul 2002 00:09:40 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/07/22 00:09:40
Modified files:
designer : TODO
designer/src : Designer.py TemplateBase.py TreeView.py
designer/src/schema: Instance.py TreeView.py
designer/src/schema/parser: GSParser.py Objects.py
designer/templates/schema: Introspection.py
Log message:
removed more forms-specific cruft in designer; added primary key
support to the Introspection schema wizard; fixed wizard support
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/TODO.diff?cvsroot=OldCVS&tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/Designer.py.diff?cvsroot=OldCVS&tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/TemplateBase.py.diff?cvsroot=OldCVS&tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/TreeView.py.diff?cvsroot=OldCVS&tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/schema/Instance.py.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/schema/TreeView.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/schema/parser/GSParser.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/schema/parser/Objects.py.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/templates/schema/Introspection.py.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnue/designer/TODO
diff -c gnue/designer/TODO:1.8 gnue/designer/TODO:1.9
*** gnue/designer/TODO:1.8 Tue Mar 26 11:11:36 2002
--- gnue/designer/TODO Mon Jul 22 00:09:40 2002
***************
*** 13,32 ****
environment.
* Generalize Designer's code to so we can add other modules (such
! as Reports, GEAS, Integrator)
* Implement "Project" functionality.
* Create new project
* Pack project for distributing
==================================================================
! NOTE:
! TODO's are notated in the source files as they are encountered, so
! viewing the source files will show more TODO's than are in this
! file. Change to the source directory and "grep TODO *.py" to
! get a better feel of what needs to be done.
--- 13,36 ----
environment.
* Generalize Designer's code to so we can add other modules (such
! as Reports, GEAS, Integrator) [in progress]
* Implement "Project" functionality.
* Create new project
* Pack project for distributing
+ * Improve Wizards:
+ * Implement tab-navigation in wizards (currently is mouse only)
+ * Dynamically figure the needed size for a wizard dialog AND/OR
+ dynamically wrap text messages.
==================================================================
! NOTE:
! TODO's are noted in the source files as they are encountered, so
! viewing the source files will show more TODO's than are in this
! file. Change to the source directory and "grep TODO *.py" to
! get a better feel of what needs to be done.
***************
*** 38,44 ****
Migrate to new UI system implemented in GNUE Forms
?.?.?
! add support for Reports
more introspection of data source (tree views of them)
add support for "Projects"
--- 42,48 ----
Migrate to new UI system implemented in GNUE Forms
?.?.?
! add support for Reports
more introspection of data source (tree views of them)
add support for "Projects"
Index: gnue/designer/src/Designer.py
diff -c gnue/designer/src/Designer.py:1.48 gnue/designer/src/Designer.py:1.49
*** gnue/designer/src/Designer.py:1.48 Fri Jul 19 19:21:12 2002
--- gnue/designer/src/Designer.py Mon Jul 22 00:09:40 2002
***************
*** 135,156 ****
def RunWizard(self, templateInformation):
- # TODO: Currently, running a wizard creates a temporary
- # TODO: instance on screen. This is not a problem other
- # TODO: than it is a tacky way to handle wizards. A new
- # TODO: instance is created once the wizard is complete
- # TODO: that holds the newly created form.
- # TODO: (Note: I want to do away with the interim
- # TODO: instance, not do away with having to
- # TODO: create a new, final instance.)
-
product = templateInformation['Product']
templateSupport = dyn_import('gnue.designer.%s.TemplateSupport' % product)
instance = self.newInstance(product)
- root = templateSupport.createRootObject(instance)
! if not TemplateParser.TemplateParser(instance, root,
instance, templateInformation).run():
instance.Close()
--- 135,146 ----
def RunWizard(self, templateInformation):
product = templateInformation['Product']
templateSupport = dyn_import('gnue.designer.%s.TemplateSupport' % product)
instance = self.newInstance(product)
! if not TemplateParser.TemplateParser(instance, instance.rootObject,
instance, templateInformation).run():
instance.Close()
Index: gnue/designer/src/TemplateBase.py
diff -c gnue/designer/src/TemplateBase.py:1.13
gnue/designer/src/TemplateBase.py:1.14
*** gnue/designer/src/TemplateBase.py:1.13 Sun Jul 21 22:34:56 2002
--- gnue/designer/src/TemplateBase.py Mon Jul 22 00:09:40 2002
***************
*** 114,121 ****
def AddElement(self, tag, parent, attributes={}):
o = self.parser.elements[tag]['BaseClass'](parent)
! for attr in attributes.keys():
! o.__dict__[attr] = attributes[attr]
o._buildObject()
self.parser.instance.onCreateObject(o, __name__)
return o
--- 114,120 ----
def AddElement(self, tag, parent, attributes={}):
o = self.parser.elements[tag]['BaseClass'](parent)
! o.__dict__.update(attributes)
o._buildObject()
self.parser.instance.onCreateObject(o, __name__)
return o
Index: gnue/designer/src/TreeView.py
diff -c gnue/designer/src/TreeView.py:1.21 gnue/designer/src/TreeView.py:1.22
*** gnue/designer/src/TreeView.py:1.21 Fri Jun 28 00:03:38 2002
--- gnue/designer/src/TreeView.py Mon Jul 22 00:09:40 2002
***************
*** 70,76 ****
if object == None:
return
if handler != __name__:
! GDebug.printMesg(4,"Adding %s (%s)" % (object.name, object._type))
self.inventoryObject(object)
def onModifyObject (self, object, handler, modifications):
--- 70,79 ----
if object == None:
return
if handler != __name__:
! try:
! GDebug.printMesg(4,"Adding %s (%s)" % (object.name, object._type))
! except:
! pass
self.inventoryObject(object)
def onModifyObject (self, object, handler, modifications):
Index: gnue/designer/src/schema/Instance.py
diff -c gnue/designer/src/schema/Instance.py:1.5
gnue/designer/src/schema/Instance.py:1.6
*** gnue/designer/src/schema/Instance.py:1.5 Wed Jul 10 12:05:18 2002
--- gnue/designer/src/schema/Instance.py Mon Jul 22 00:09:40 2002
***************
*** 78,88 ****
def createTools(self):
self.addTool(_('propertyEditor'), _('Property Inspector'), PropertyEditor)
! self.addTool(_('treeEditor'), _('Object Navigator'), TreeView)
self.addTool(_('schemaViewer'), _('Schema Navigator'), SchemaViewer)
self.loadWizards(wizards)
!
def preSave(self):
pass
--- 78,89 ----
def createTools(self):
self.addTool(_('propertyEditor'), _('Property Inspector'), PropertyEditor)
! ## TODO: Causing a segfault with Wizards!!!!
! ## self.addTool(_('treeEditor'), _('Object Navigator'), TreeView)
self.addTool(_('schemaViewer'), _('Schema Navigator'), SchemaViewer)
self.loadWizards(wizards)
!
def preSave(self):
pass
Index: gnue/designer/src/schema/TreeView.py
diff -c gnue/designer/src/schema/TreeView.py:1.1
gnue/designer/src/schema/TreeView.py:1.2
*** gnue/designer/src/schema/TreeView.py:1.1 Fri Jun 28 00:03:38 2002
--- gnue/designer/src/schema/TreeView.py Mon Jul 22 00:09:40 2002
***************
*** 45,51 ****
def inventoryObject (self, object):
if object != self.rootObject:
icon = 'properties'
! parentTreeItem = object._parent._treeItem
if object._type == 'GSTables':
icon = 'datasource'
elif object._type == 'GSTable':
--- 45,54 ----
def inventoryObject (self, object):
if object != self.rootObject:
icon = 'properties'
! try:
! parentTreeItem = object._parent._treeItem
! except AttributeError:
! parentTreeItem = None
if object._type == 'GSTables':
icon = 'datasource'
elif object._type == 'GSTable':
Index: gnue/designer/src/schema/parser/GSParser.py
diff -c gnue/designer/src/schema/parser/GSParser.py:1.4
gnue/designer/src/schema/parser/GSParser.py:1.5
*** gnue/designer/src/schema/parser/GSParser.py:1.4 Mon Jul 15 16:12:50 2002
--- gnue/designer/src/schema/parser/GSParser.py Mon Jul 22 00:09:40 2002
***************
*** 166,171 ****
--- 166,192 ----
'Typecast': GTypecast.name } },
'ParentTags': ('constraint',) },
+ 'indexes': {
+ 'BaseClass': Objects.GSIndexes,
+ 'SingleInstance': 1,
+ 'ParentTags': ('table',) },
+ 'index': {
+ 'BaseClass': Objects.GSIndex,
+ 'Attributes': {
+ 'name': {
+ 'Required': 1,
+ 'Typecast': GTypecast.name },
+ 'unique': {
+ 'Typecast': GTypecast.boolean } },
+ 'ParentTags': ('indexes',) },
+
+ 'indexfield': {
+ 'BaseClass': Objects.GSIndexField,
+ 'Attributes': {
+ 'name': {
+ 'Required': 1,
+ 'Typecast': GTypecast.name } },
+ 'ParentTags': ('index',) },
'data': {
'BaseClass': Objects.GSData,
***************
*** 183,188 ****
--- 204,210 ----
'Typecast': GTypecast.name } },
'ParentTags': ('data',) },
+
'rows': {
'BaseClass': Objects.GSRows,
'SingleInstance': 1,
***************
*** 200,206 ****
'Typecast': GTypecast.name },
'type': {
'Required': 0,
! 'Typecast': GTypecast.name,
'Default': 'text' } },
'ParentTags': ('row',),
'MixedContent': 1, },
--- 222,228 ----
'Typecast': GTypecast.name },
'type': {
'Required': 0,
! 'Typecast': GTypecast.name,
'Default': 'text' } },
'ParentTags': ('row',),
'MixedContent': 1, },
Index: gnue/designer/src/schema/parser/Objects.py
diff -c gnue/designer/src/schema/parser/Objects.py:1.3
gnue/designer/src/schema/parser/Objects.py:1.4
*** gnue/designer/src/schema/parser/Objects.py:1.3 Wed Jul 10 18:27:38 2002
--- gnue/designer/src/schema/parser/Objects.py Mon Jul 22 00:09:40 2002
***************
*** 81,86 ****
--- 81,94 ----
def __init__(self, parent):
GSObject.__init__(self, parent, type='GSIndexes')
+ class GSIndex(GSObject):
+ def __init__(self, parent):
+ GSObject.__init__(self, parent, type='GSIndex')
+
+ class GSIndexField(GSObject):
+ def __init__(self, parent):
+ GSObject.__init__(self, parent, type='GSIndexField')
+
class GSData(GSObject):
def __init__(self, parent):
GSObject.__init__(self, parent, type='GSData')
Index: gnue/designer/templates/schema/Introspection.py
diff -c gnue/designer/templates/schema/Introspection.py:1.2
gnue/designer/templates/schema/Introspection.py:1.3
*** gnue/designer/templates/schema/Introspection.py:1.2 Fri Jul 19 19:21:15 2002
--- gnue/designer/templates/schema/Introspection.py Mon Jul 22 00:09:40 2002
***************
*** 122,128 ****
def Finalize(self):
# Set the basic attributes of the schema
! self.ModifyElement(self.root, title=self.variables['title'])
conn = self.variables['connection']
--- 122,132 ----
def Finalize(self):
# Set the basic attributes of the schema
! ###################################################
! ## Temporary! ModifyElement is causing segfault! ##
! self.root.title = self.variables['title']
! ## self.ModifyElement(self.root, title=self.variables['title'])
! ###################################################
conn = self.variables['connection']
***************
*** 132,142 ****
# Create the tables and fields...
!
tables = self.AddElement('tables', self.root, {})
# Create each table
for tablename in tablesorted:
schema = self.GetSourceSchema(conn, tablename)
table = self.AddElement( 'table', tables,
{ 'name': tablename } )
--- 136,149 ----
# Create the tables and fields...
! print "Adding <tables>"
tables = self.AddElement('tables', self.root, {})
+
+ print self.root._children
# Create each table
for tablename in tablesorted:
+ print "Adding <table> %s" % tablename
schema = self.GetSourceSchema(conn, tablename)
table = self.AddElement( 'table', tables,
{ 'name': tablename } )
***************
*** 145,150 ****
--- 152,158 ----
# Add each field
for field in schema.getChildSchema(schema):
+ print " Adding <field> %s" % field.name
attrs = { 'name': field.name,
'type': field.datatype }
***************
*** 163,171 ****
--- 171,186 ----
# Create the field element
self.AddElement('field', fields, attrs)
+ # Primary keys
+ if hasattr(schema,'primarykey') and schema.primarykey:
+ pk = self.AddElement ('primarykey', table, {})
+ for field in schema.primarykey:
+ self.AddElement('pkfield', pk, {'name': field})
+
# Add misc tags
self.AddElement ('constraints', table, {})
self.AddElement ('indexes', table, {})
+
# That's it... we're done.
return 1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer TODO src/Designer.py src/Template...,
Jason Cater <=