commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue common/etc/sample.gnue.conf common/src/GDa...


From: Jason Cater
Subject: gnue common/etc/sample.gnue.conf common/src/GDa...
Date: Wed, 20 Nov 2002 19:27:34 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/11/20 19:27:34

Modified files:
        common/etc     : sample.gnue.conf 
        common/src     : GDataSource.py 
        forms/doc      : Developers-Guide.sxw 
        forms/src      : GFParser.py 
        forms/src/GFObjects: GFDatabase.py 

Log message:
        * Moved the <database> tag to common (as a <connection> tag... we will 
have a converter script soon)
        * Fixed some incorrect code samples in the dev guide

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/etc/sample.gnue.conf.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GDataSource.py.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/doc/Developers-Guide.sxw.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFParser.py.diff?tr1=1.84&tr2=1.85&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFObjects/GFDatabase.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: gnue/common/etc/sample.gnue.conf
diff -c gnue/common/etc/sample.gnue.conf:1.38 
gnue/common/etc/sample.gnue.conf:1.39
*** gnue/common/etc/sample.gnue.conf:1.38       Fri Oct 25 18:08:33 2002
--- gnue/common/etc/sample.gnue.conf    Wed Nov 20 19:27:33 2002
***************
*** 259,264 ****
--- 259,265 ----
  
  [navigator]
  disableSplash = 1
+ FormDir="bob"
  #ProcessDir = processes
  # for *nix
  #RunFormCommand = gnue-forms
Index: gnue/common/src/GDataSource.py
diff -c gnue/common/src/GDataSource.py:1.51 gnue/common/src/GDataSource.py:1.52
*** gnue/common/src/GDataSource.py:1.51 Sun Nov 10 16:14:32 2002
--- gnue/common/src/GDataSource.py      Wed Nov 20 19:27:34 2002
***************
*** 358,364 ****
  
  ######
  #
! #
  #
  ######
  class GStaticSet(GObjects.GObj):
--- 358,364 ----
  
  ######
  #
! # Static Datasource Support
  #
  ######
  class GStaticSet(GObjects.GObj):
***************
*** 373,378 ****
--- 373,407 ----
    def __init__(self, parent=None):
       GObjects.GObj.__init__(self, parent, type="GDStaticSetField")
  
+ 
+ ######
+ #
+ #
+ #
+ ######
+ class GConnection(GObjects.GObj):
+   def __init__(self, parent=None):
+     GFObj.__init__(self, parent, "GCConnection")
+     self.comment = ""
+     self.name = ""
+     self._inits =[self.initialize]
+ 
+   def _buildObject(self):
+     self.name = string.lower(self.name)
+     return GObjects.GObj._buildObject(self)
+ 
+   def initialize(self):
+     # Add our database connection information to the connections
+     # manager, then let it handle everything from there.
+     self.findParentOfType(None)._app.connections.\
+         addConnectionSpecification(self.name, {
+            'name': self.name,
+            'provider': self.provider,
+            'dbname': self.dbname,
+            'host': self.host } )
+ 
+ 
+ 
  ######
  #
  # Used by client GParsers to automatically pull supported xml tags
***************
*** 430,436 ****
        'staticset': {
           'BaseClass': GStaticSet,
  #  TODO: This should be replaced by a SingleInstanceInParentObject
! #        instead of SingleInstance (in the whole file)         
  #         'SingleInstance': 1,
           'Attributes': {
              'fields':        {
--- 459,465 ----
        'staticset': {
           'BaseClass': GStaticSet,
  #  TODO: This should be replaced by a SingleInstanceInParentObject
! #        instead of SingleInstance (in the whole file)
  #         'SingleInstance': 1,
           'Attributes': {
              'fields':        {
***************
*** 450,455 ****
--- 479,514 ----
                 'Typecast': GTypecast.text,
                 'Required': 1 } },
           'ParentTags': ('staticsetrow',) },
+       'connection': {
+          'BaseClass': GConnection,
+          'Attributes': {
+             'name': {
+                'Required': 1,
+                'Unique': 1,
+                'Typecast': GTypecast.name,
+                'Description': 'TODO' },
+             'provider': {
+                'Required': 1,
+                'Typecast': GTypecast.name,
+                'Description': 'TODO' },
+             'dbname': {
+                'Required': 0,
+                'Typecast': GTypecast.text,
+                'Description': 'TODO' },
+             'service': {
+                'Required': 0,
+                'Typecast': GTypecast.text,
+                'Description': 'TODO' },
+             'comment': {
+                'Required': 0,
+                'Typecast': GTypecast.text,
+                'Description': 'TODO' },
+             'host': {
+                'Required': 0,
+                'Typecast': GTypecast.text,
+                'Description': 'TODO' } },
+          'ParentTags': None,
+          'Description': 'TODO' },
    }
  
    # Add conditional elements
***************
*** 459,464 ****
--- 518,526 ----
  
    for alteration in updates.keys():
      xmlElements[alteration].update(updates[alteration])
+ 
+   # Connections will have the same parent as datasources
+   xmlElements['connection']['ParentTags'] = 
xmlElements['datasource']['ParentTags']
  
    return xmlElements
  
Index: gnue/forms/doc/Developers-Guide.sxw
Index: gnue/forms/src/GFObjects/GFDatabase.py
diff -c gnue/forms/src/GFObjects/GFDatabase.py:1.7 
gnue/forms/src/GFObjects/GFDatabase.py:1.8
*** gnue/forms/src/GFObjects/GFDatabase.py:1.7  Mon Oct  8 08:38:14 2001
--- gnue/forms/src/GFObjects/GFDatabase.py      Wed Nov 20 19:27:34 2002
***************
*** 43,49 ****
      self.comment = ""
      self.name = ""
      self._inits =[self.initialize]
!     
    def _buildObject(self):
      self.name = string.lower(self.name)
      return GFObj._buildObject(self)
--- 43,49 ----
      self.comment = ""
      self.name = ""
      self._inits =[self.initialize]
! 
    def _buildObject(self):
      self.name = string.lower(self.name)
      return GFObj._buildObject(self)
***************
*** 53,61 ****
      # manager, then let it handle everything from there.
      self.findParentOfType('GFForm')._app.connections.\
          addConnectionSpecification(self.name, {
!            'name': self.name, 
!            'provider': self.provider, 
!            'dbname': self.dbname, 
             'host': self.host } )
  
  
--- 53,61 ----
      # manager, then let it handle everything from there.
      self.findParentOfType('GFForm')._app.connections.\
          addConnectionSpecification(self.name, {
!            'name': self.name,
!            'provider': self.provider,
!            'dbname': self.dbname,
             'host': self.host } )
  
  
Index: gnue/forms/src/GFParser.py
diff -c gnue/forms/src/GFParser.py:1.84 gnue/forms/src/GFParser.py:1.85
*** gnue/forms/src/GFParser.py:1.84     Tue Nov 19 20:01:40 2002
--- gnue/forms/src/GFParser.py  Wed Nov 20 19:27:34 2002
***************
*** 110,146 ****
           'ParentTags': None,
           'Description': 'TODO' },
  
-       'database': {
-          'BaseClass': GFObjects.GFDatabase,
-          'Attributes': {
-             'name': {
-                'Required': 1,
-                'Unique': 1,
-                'Typecast': GTypecast.name,
-                'Description': 'TODO' },
-             'provider': {
-                'Required': 1,
-                'Typecast': GTypecast.name,
-                'Description': 'TODO' },
-             'dbname': {
-                'Required': 0,
-                'Typecast': GTypecast.text,
-                'Description': 'TODO' },
-             'service': {
-                'Required': 0,
-                'Typecast': GTypecast.text,
-                'Description': 'TODO' },
-             'comment': {
-                'Required': 0,
-                'Typecast': GTypecast.text,
-                'Description': 'TODO' },
-             'host': {
-                'Required': 0,
-                'Typecast': GTypecast.text,
-                'Description': 'TODO' } },
-          'ParentTags': ('form',),
-          'Description': 'TODO' },
- 
        'page': {
           'BaseClass': GFObjects.GFPage,
           'Required': 1,
--- 110,115 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]