[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue common/src/GDataSource.py forms/src/GFPars...
From: |
Jason Cater |
Subject: |
gnue common/src/GDataSource.py forms/src/GFPars... |
Date: |
Wed, 20 Nov 2002 20:39:37 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/11/20 20:39:37
Modified files:
common/src : GDataSource.py
forms/src : GFParser.py
forms/src/GFObjects: __init__.py
forms/utils : gfd04to05.py
Added files:
forms/src/GFObjects: GFLayout.py GFLogic.py
Log message:
start of layout/logic separation; cleaned up GFParser.py to reflect new
tags
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GDataSource.py.diff?tr1=1.52&tr2=1.53&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFParser.py.diff?tr1=1.85&tr2=1.86&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFObjects/GFLayout.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFObjects/GFLogic.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFObjects/__init__.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/utils/gfd04to05.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnue/common/src/GDataSource.py
diff -c gnue/common/src/GDataSource.py:1.52 gnue/common/src/GDataSource.py:1.53
*** gnue/common/src/GDataSource.py:1.52 Wed Nov 20 19:27:34 2002
--- gnue/common/src/GDataSource.py Wed Nov 20 20:39:36 2002
***************
*** 51,57 ****
def __init__(self, parent=None, type="GDataSource"):
GObjects.GObj.__init__(self, parent, type)
self.type = "object"
! self.database = None
self._connections = None
self._dataObject = None
self._connectionComment = ""
--- 51,57 ----
def __init__(self, parent=None, type="GDataSource"):
GObjects.GObj.__init__(self, parent, type)
self.type = "object"
! self.connection = None
self._connections = None
self._dataObject = None
self._connectionComment = ""
***************
*** 92,104 ****
raise AttributeError, attr
def _buildObject(self):
try:
for field in string.split(self.explicitfields,','):
self._fieldReferences[field] = 1
except AttributeError:
pass
try:
! # TODO: This **really** needs to be deprecated and
# TODO: should be using <sorting> tags
for field in string.split(self.order_by,','):
if field[-5:].lower() == ' desc':
--- 92,110 ----
raise AttributeError, attr
def _buildObject(self):
+
+ # Added 0.5.0 -- Delete before 1.0
+ if hasattr(self,'database'):
+ self.connection = self.database
+ del self.database
+
try:
for field in string.split(self.explicitfields,','):
self._fieldReferences[field] = 1
except AttributeError:
pass
try:
! # TODO: This **really** needs to be deprecated and
# TODO: should be using <sorting> tags
for field in string.split(self.order_by,','):
if field[-5:].lower() == ' desc':
***************
*** 154,160 ****
def getCondition():
return dataObject._staticCondition
!
#
# This method should be called after the object is created
# but before any other methods are called
--- 160,166 ----
def getCondition():
return dataObject._staticCondition
!
#
# This method should be called after the object is created
# but before any other methods are called
***************
*** 163,169 ****
self._connections = connectionManager
def initialize(self):
! if not self.database:
# We are a connectionless datasource (virtual?)
# We have to bind to something, so bind to empty or static driver
if not self.type=="static":
--- 169,175 ----
self._connections = connectionManager
def initialize(self):
! if not self.connection:
# We are a connectionless datasource (virtual?)
# We have to bind to something, so bind to empty or static driver
if not self.type=="static":
***************
*** 183,194 ****
elif self._connections:
! self.database = string.lower(self.database)
# This will throw a GConnections.NotFoundError if an unknown
# connection name is specified. The calling method should
# catch this exception and handle it properly (exit w/message)
dataObject = \
! self._connections.getDataObject(self.database, self.type)
GDebug.printMesg (7, "GDataSource.py bound to %s " % self._dataObject)
self.name = string.lower(self.name)
--- 189,200 ----
elif self._connections:
! self.connection = string.lower(self.connection)
# This will throw a GConnections.NotFoundError if an unknown
# connection name is specified. The calling method should
# catch this exception and handle it properly (exit w/message)
dataObject = \
! self._connections.getDataObject(self.connection, self.type)
GDebug.printMesg (7, "GDataSource.py bound to %s " % self._dataObject)
self.name = string.lower(self.name)
***************
*** 226,234 ****
def connect(self):
! if self.database != None:
self._connections.\
! requestConnection(self._dataObject, self.database)
def getDataObject(self):
return self._dataObject
--- 232,240 ----
def connect(self):
! if self.connection != None:
self._connections.\
! requestConnection(self._dataObject, self.connection)
def getDataObject(self):
return self._dataObject
***************
*** 429,436 ****
'type': {
'Typecast': GTypecast.name,
'Default': "object" },
! 'database': {
'Typecast': GTypecast.name },
'table': {
'Typecast': GTypecast.name },
'cache': {
--- 435,445 ----
'type': {
'Typecast': GTypecast.name,
'Default': "object" },
! 'connection': {
'Typecast': GTypecast.name },
+ 'database': {
+ 'Typecast': GTypecast.name,
+ 'Deprecated': 'Use {connection} attribute instead' },
'table': {
'Typecast': GTypecast.name },
'cache': {
Index: gnue/forms/src/GFObjects/__init__.py
diff -c gnue/forms/src/GFObjects/__init__.py:1.5
gnue/forms/src/GFObjects/__init__.py:1.6
*** gnue/forms/src/GFObjects/__init__.py:1.5 Mon Nov 18 01:40:55 2002
--- gnue/forms/src/GFObjects/__init__.py Wed Nov 20 20:39:37 2002
***************
*** 1,19 ****
__all__ = [
! "GFBlock",
! "GFDataSource",
! "GFLabel",
! "GFOption",
! "GFScrollBar",
! "GFBox",
! "GFDatabase",
! "GFMsgBox",
! "GFOptions",
! "GFValue",
! "GFButton",
! "GFEntry",
! "GFField",
! "GFObj",
! "GFPage",
"GFParameter"
]
--- 1,21 ----
__all__ = [
! "GFBlock",
! "GFDataSource",
! "GFLabel",
! "GFOption",
! "GFScrollBar",
! "GFBox",
! "GFDatabase",
! "GFMsgBox",
! "GFOptions",
! "GFValue",
! "GFButton",
! "GFEntry",
! "GFField",
! "GFObj",
! "GFPage",
! "GFLogic",
! "GFLayout",
"GFParameter"
]
Index: gnue/forms/src/GFParser.py
diff -c gnue/forms/src/GFParser.py:1.85 gnue/forms/src/GFParser.py:1.86
*** gnue/forms/src/GFParser.py:1.85 Wed Nov 20 19:27:34 2002
--- gnue/forms/src/GFParser.py Wed Nov 20 20:39:37 2002
***************
*** 58,64 ****
def loadFile(buffer, app, initialize=1):
return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', 'form',
initialize, attributes={"_app": app,
! "_parameters": app._parameters,
"_connections": app.connections })
--- 58,64 ----
def loadFile(buffer, app, initialize=1):
return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', 'form',
initialize, attributes={"_app": app,
! "_parameters": app._parameters,
"_connections": app.connections })
***************
*** 110,119 ****
'ParentTags': None,
'Description': 'TODO' },
'page': {
'BaseClass': GFObjects.GFPage,
'Required': 1,
! 'Importable':1,
'Attributes': {
'name': {
'Unique': 1,
--- 110,135 ----
'ParentTags': None,
'Description': 'TODO' },
+ 'logic': {
+ 'BaseClass': GFObjects.GFLogic,
+ 'Required': 1,
+ 'Importable': 1,
+ 'SingleInstance': 1,
+ 'ParentTags': ('layout',),
+ 'Description': 'TODO' },
+
+ 'layout': {
+ 'BaseClass': GFObjects.GFLayout,
+ 'Required': 1,
+ 'Importable': 1,
+ 'SingleInstance': 1,
+ 'ParentTags': ('layout',),
+ 'Description': 'TODO' },
+
'page': {
'BaseClass': GFObjects.GFPage,
'Required': 1,
! 'Importable': 1,
'Attributes': {
'name': {
'Unique': 1,
***************
*** 123,129 ****
'caption': {
'Typecast': GTypecast.text,
'Description': 'TODO' } },
! 'ParentTags': ('form',),
'Description': 'TODO' },
'block': {
--- 139,145 ----
'caption': {
'Typecast': GTypecast.text,
'Description': 'TODO' } },
! 'ParentTags': ('layout',),
'Description': 'TODO' },
'block': {
***************
*** 150,161 ****
'between duplicated widgets. Serves the same '
'purpose as some of the gap attributes on '
'individual widgets.' },
! 'transparentBlock':{
'Typecast': GTypecast.boolean,
! 'Default': 0,
! 'Description': 'If set then you can tab out of the block via
next '
! 'or previous field events. Makes navigation in '
! 'mutliblock forms easier. ' },
'restrictDelete':{
'Typecast': GTypecast.boolean,
'Default': 0,
--- 166,179 ----
'between duplicated widgets. Serves the same '
'purpose as some of the gap attributes on '
'individual widgets.' },
! 'transparent':{
'Typecast': GTypecast.boolean,
! 'Default': 1,
! 'Description': 'If set, then you can tab out of the block via
next- '
! 'or previous-field events. Makes navigation in '
! 'mutliblock forms easier. If false, focus stays
'
! 'within a block until user explicitly moves to '
! 'another block' },
'restrictDelete':{
'Typecast': GTypecast.boolean,
'Default': 0,
***************
*** 172,178 ****
'Description': 'The name of a datasource (defined in by a '
'{<datasource>} tag.) that provides this block '
'with it\'s data.' } },
! 'ParentTags': ('page',),
'Description': 'TODO' },
'label': {
--- 190,196 ----
'Description': 'The name of a datasource (defined in by a '
'{<datasource>} tag.) that provides this block '
'with it\'s data.' } },
! 'ParentTags': ('logic',),
'Description': 'TODO' },
'label': {
***************
*** 215,227 ****
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page','block',),
'Description': 'TODO' },
! # If you implement a new entry "style", add to the entryStyles
! # structure after this list
! 'entry': {
! 'BaseClass': GFObjects.GFEntry,
'Importable':1,
'Attributes': {
'name': {
--- 233,243 ----
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page',),
'Description': 'TODO' },
! 'field': {
! 'BaseClass': GFObjects.GFField,
'Importable':1,
'Attributes': {
'name': {
***************
*** 234,262 ****
'Typecast': GTypecast.name,
'Description': 'The name of the field in the datasource to '
'which this widget is tied.' },
- 'height': {
- 'Typecast': GTypecast.whole,
- 'Default': 1,
- 'Description': 'The height of the entry in text rows. ' },
- 'width': {
- 'Typecast': GTypecast.whole,
- 'Description': 'The width of the entry in text columns.' },
'max_length': {
'Typecast': GTypecast.whole,
'Description': 'The maximum number of characters the user is '
'allowed to enter into the entry.' },
! 'visibleCount':{
! 'Typecast': GTypecast.whole,
! 'Deprecated': 'Use the <block> "rows" attribute instead.' },
! 'focusorder': {
! 'Typecast': GTypecast.whole,
! 'Description': 'TODO'},
! 'rows': {
! 'Typecast': GTypecast.whole,
! 'Description': 'TODO'},
! 'rowSpacer': {
'Typecast': GTypecast.whole,
! 'Description': 'TODO' },
'readonly': {
'Typecast': GTypecast.boolean,
'Description': 'It defined the user will be unable to alter '
--- 250,264 ----
'Typecast': GTypecast.name,
'Description': 'The name of the field in the datasource to '
'which this widget is tied.' },
'max_length': {
'Typecast': GTypecast.whole,
'Description': 'The maximum number of characters the user is '
'allowed to enter into the entry.' },
! 'min_length': {
'Typecast': GTypecast.whole,
! 'Description': 'The minimum number of characters the user must
'
! 'enter into the entry.',
! 'Default': 0 },
'readonly': {
'Typecast': GTypecast.boolean,
'Description': 'It defined the user will be unable to alter '
***************
*** 268,306 ****
'to a commit.',
'Typecast': GTypecast.boolean,
'Default': 0 },
- 'uppercase': {
- 'Deprecated': 'Use case="upper" instead.',
- 'Typecast': GTypecast.boolean,
- 'Default': 0 },
- 'lowercase': {
- 'Deprecated': 'Use case="lower" instead.',
- 'Typecast': GTypecast.boolean,
- 'Default': 0 },
- 'numeric': {
- 'Deprecated': 'Use typecast="number" instead',
- 'Typecast': GTypecast.boolean,
- 'Default': 0 },
- 'hidden': {
- 'Typecast': GTypecast.boolean,
- 'Default': 0,
- 'Description': 'If defined the entry widget will not be '
- 'displayed on the form. This is usefull for '
- 'fields the user doesn\'t need to know about '
- 'that you wish to update via triggers.' },
- 'style': {
- 'Typecast': GTypecast.name,
- 'ValueSet': {
- 'default': {},
- 'dropdown': {},
- 'checkbox': {},
- 'label': {} },
- 'Default': 'default',
- 'Description': 'The style of entry widget requested. Currently
'
- 'either {text}, {label}, {checkbox}, or
{dropdown}. To '
- 'use {dropdown} you are required to use both
the '
- '{fk_source}, {fk_key}, and {fk_description} '
- 'attributes. The {label} style implies the '
- '{readonly} attribute.' },
'case': {
'Typecast': GTypecast.name,
'ValueSet': {
--- 270,275 ----
***************
*** 321,350 ****
'formatmask': {
'Typecast': GTypecast.text,
'Description': 'TODO' },
- 'inputmask': {
- 'Typecast': GTypecast.text,
- 'Description': 'TODO' },
- 'displaymask': {
- 'Typecast': GTypecast.text,
- 'Description': 'TODO' },
'value': {
'Typecast': GTypecast.text,
'Description': 'TODO' },
! 'foreign_key': {
! 'Typecast': GTypecast.name,
! 'Deprecated': 'Use fk_source="..." and fk_key="..." instead.',
! 'Description': 'Set in the format datasource.field This forces
any '
! 'input into this entry to match the values
stored '
! 'in the datasource.field' },
! 'foreign_key_description': {
! 'Typecast': GTypecast.text,
! 'Deprecated': 'Use fk_description="..." instead.',
! 'Description': 'The description used if a style of dropdown is
'
! 'selected. This fields value is displayed in
the '
! 'dropdown but the foreign_key value is actually
'
! 'stored in the field. This allows you to
display '
! 'something like the full name of a US state but
'
! 'only store it\'s 2 character abrievation.' },
'fk_source': {
'Typecast': GTypecast.name,
'Description': 'TODO' },
--- 290,313 ----
'formatmask': {
'Typecast': GTypecast.text,
'Description': 'TODO' },
'value': {
'Typecast': GTypecast.text,
'Description': 'TODO' },
! ## 'foreign_key': {
! ## 'Typecast': GTypecast.name,
! ## 'Deprecated': 'Use fk_source="..." and fk_key="..."
instead.',
! ## 'Description': 'Set in the format datasource.field This
forces any '
! ## 'input into this entry to match the values
stored '
! ## 'in the datasource.field' },
! ## 'foreign_key_description': {
! ## 'Typecast': GTypecast.text,
! ## 'Deprecated': 'Use fk_description="..." instead.',
! ## 'Description': 'The description used if a style of dropdown
is '
! ## 'selected. This fields value is displayed in
the '
! ## 'dropdown but the foreign_key value is
actually '
! ## 'stored in the field. This allows you to
display '
! ## 'something like the full name of a US state
but '
! ## 'only store it\'s 2 character abrievation.' },
'fk_source': {
'Typecast': GTypecast.name,
'Description': 'TODO' },
***************
*** 354,359 ****
--- 317,330 ----
'fk_description': {
'Typecast': GTypecast.name,
'Description': 'TODO' },
+ 'fk_refresh': {
+ 'Typecast': GTypecast.name,
+ 'ValueSet': {
+ 'startup': {},
+ 'change': {},
+ 'commit': {} },
+ 'Default': 'onstartup'
+ 'Description': 'TODO' },
'default': {
'Typecast': GTypecast.text,
'Description': 'The default value for any new records created.
'
***************
*** 382,398 ****
'Typecast': GTypecast.boolean,
'Default': 0,
'Description': 'TODO' },
! 'no_ltrim': {
! 'Description': 'Suppress trimming of extraneous space at '
'beginning of user input.',
'Typecast': GTypecast.boolean,
'Default': 0,
'Description': 'TODO' },
! 'no_rtrim': {
! 'Description': 'Suppress trimming of extraneous space at end '
'of user input.',
'Typecast': GTypecast.boolean,
'Default': 0,
'Description': 'TODO' },
'x': {
'Required': 1,
--- 353,438 ----
'Typecast': GTypecast.boolean,
'Default': 0,
'Description': 'TODO' },
! 'ltrim': {
! 'Description': 'Trim extraneous space at '
'beginning of user input.',
'Typecast': GTypecast.boolean,
'Default': 0,
'Description': 'TODO' },
! 'rtrim': {
! 'Description': 'Trim extraneous space at end '
'of user input.',
'Typecast': GTypecast.boolean,
+ 'Default': 1,
+ 'Description': 'TODO' } },
+ 'ParentTags': ('block',),
+ 'Description': 'TODO' },
+
+ # If you implement a new entry "style", add to the entryStyles
+ # structure after this list
+ 'entry': {
+ 'BaseClass': GFObjects.GFEntry,
+ 'Attributes': {
+ 'name': {
+ 'Unique': 1,
+ 'Typecast': GTypecast.name,
+ 'Description': 'The unique ID of the entry.' },
+ 'field': {
+ 'Typecast': GTypecast.name,
+ 'Required': 1,
+ 'Description': 'The name of the field that this ties to.' },
+ 'block': {
+ 'Typecast': GTypecast.block,
+ 'Required': 1,
+ 'Description': 'The name of the field that this ties to.' },
+ 'height': {
+ 'Typecast': GTypecast.whole,
+ 'Default': 1,
+ 'Description': 'The height of the entry in text rows. ' },
+ 'width': {
+ 'Typecast': GTypecast.whole,
+ 'Description': 'The width of the entry in text columns.' },
+ 'focusorder': {
+ 'Typecast': GTypecast.whole,
+ 'Description': 'TODO'},
+ 'rows': {
+ 'Typecast': GTypecast.whole,
+ 'Description': 'TODO'},
+ 'rowSpacer': {
+ 'Typecast': GTypecast.whole,
+ 'Description': 'TODO' },
+ 'navigable': {
+ 'Typecast': GTypecast.boolean,
+ 'Description': 'It false, the user will be unable to navigate '
+ 'to this entry. Triggers can still '
+ 'alter the value.',
+ 'Default': 1 },
+ 'hidden': {
+ 'Typecast': GTypecast.boolean,
'Default': 0,
+ 'Description': 'If defined the entry widget will not be '
+ 'displayed on the form. This is usefull for '
+ 'fields the user doesn\'t need to know about '
+ 'that you wish to update via triggers.' },
+ 'style': {
+ 'Typecast': GTypecast.name,
+ 'ValueSet': {
+ 'default': {},
+ 'dropdown': {},
+ 'checkbox': {},
+ 'label': {} },
+ 'Default': 'default',
+ 'Description': 'The style of entry widget requested. Currently
'
+ 'either {text}, {label}, {checkbox}, or
{dropdown}. To '
+ 'use {dropdown} you are required to use both
the '
+ '{fk_source}, {fk_key}, and {fk_description} '
+ 'attributes. The {label} style implies the '
+ '{readonly} attribute.' },
+ 'inputmask': {
+ 'Typecast': GTypecast.text,
+ 'Description': 'TODO' },
+ 'displaymask': {
+ 'Typecast': GTypecast.text,
'Description': 'TODO' },
'x': {
'Required': 1,
***************
*** 405,412 ****
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget. '
'Based upon the top row of the screen being 0.'
} },
! 'ParentTags': ('block','box'),
! 'Description': 'TODO' },
'scrollbar': {
'BaseClass': GFObjects.GFScrollBar,
--- 445,452 ----
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget. '
'Based upon the top row of the screen being 0.'
} },
! 'ParentTags': ('page',),
! 'Description': 'An {entry} is the visual counterpart to a {field}.'
},
'scrollbar': {
'BaseClass': GFObjects.GFScrollBar,
***************
*** 427,433 ****
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page','block','box'),
'Description': 'TODO' },
'box': {
--- 467,473 ----
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page',),,
'Description': 'TODO' },
'box': {
***************
*** 459,465 ****
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page','block',),
'Description': 'TODO' },
'button': {
--- 499,505 ----
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page',),
'Description': 'TODO' },
'button': {
***************
*** 495,501 ****
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page','block','box'),
'Description': 'TODO' },
'options': {
--- 535,541 ----
'Required': 1,
'Typecast': GTypecast.whole,
'Description': 'The text row starting position of the widget.
Based upon the top row of the screen being 0.' } },
! 'ParentTags': ('page',),,
'Description': 'TODO' },
'options': {
***************
*** 728,733 ****
--- 768,774 ----
#
entryStyles = {'text': 'Text Field',
'dropdown': 'Drop Down Box',
+ 'label': 'Label-like Field',
'checkbox': 'Check Box' }
#######################################################
Index: gnue/forms/utils/gfd04to05.py
diff -c gnue/forms/utils/gfd04to05.py:1.2 gnue/forms/utils/gfd04to05.py:1.3
*** gnue/forms/utils/gfd04to05.py:1.2 Wed Nov 20 19:51:56 2002
--- gnue/forms/utils/gfd04to05.py Wed Nov 20 20:39:37 2002
***************
*** 181,187 ****
object.reparent(layout)
elif object._tag == 'block':
!
# Move blocks to the new <logic> tag
object.reparent(logic)
--- 181,187 ----
object.reparent(layout)
elif object._tag == 'block':
!
# Move blocks to the new <logic> tag
object.reparent(logic)
***************
*** 216,228 ****
page = object._parent._origparent
# Separate the attributes that should be in entry from field
eattr = {'block': object._parent._properties['name']}
for attr in object._properties.keys():
v = object._properties[attr]
if attr == 'name':
eattr['field'] = v
! elif attr in ('x','y','width','height','style'):
eattr[attr] = v
del object._properties[attr]
--- 216,248 ----
page = object._parent._origparent
+ # Deprecated stuff
+ if object._properties.has_key('foreign_key'):
+ (fk_source, fk_key) =
string.split(object._properties['foreign_key'],'.',1)
+ del object._properties['foreign_key']
+ object._properties['fk_source'] = fk_source
+ object._properties['fk_key'] = fk_key
+ if object._properties.has_key('foreign_key_description'):
+ fk_descr =
string.split(object._properties['foreign_key_description'],'.',1)
+ del object._properties['foreign_key_description']
+ object._properties['fk_description'] = fk_descr
+ if object._properties.has_key('no_ltrim'):
+ del object._properties['no_ltrim']
+ object._properties['ltrim'] = 'N'
+ if object._properties.has_key('no_rtrim'):
+ del object._properties['no_rtrim']
+ object._properties['rtrim'] = 'N'
+
+
+
# Separate the attributes that should be in entry from field
eattr = {'block': object._parent._properties['name']}
for attr in object._properties.keys():
v = object._properties[attr]
if attr == 'name':
eattr['field'] = v
! elif attr in ('x','y','width','height','style','hidden','focusorder',
! 'rows','rowSpacer','inputmask','displaymask'):
eattr[attr] = v
del object._properties[attr]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue common/src/GDataSource.py forms/src/GFPars...,
Jason Cater <=