[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/reports/src GRLayout.py
From: |
James Thompson |
Subject: |
gnue/reports/src GRLayout.py |
Date: |
Tue, 12 Nov 2002 22:00:13 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: James Thompson <address@hidden> 02/11/12 22:00:13
Modified files:
reports/src : GRLayout.py
Log message:
start of an on-process trigger
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/GRLayout.py.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
Patches:
Index: gnue/reports/src/GRLayout.py
diff -c gnue/reports/src/GRLayout.py:1.44 gnue/reports/src/GRLayout.py:1.45
*** gnue/reports/src/GRLayout.py:1.44 Tue Nov 12 19:39:06 2002
--- gnue/reports/src/GRLayout.py Tue Nov 12 22:00:13 2002
***************
*** 55,60 ****
--- 55,61 ----
############################################################
#
+ # GRLayout
#
class GRLayout (GObj):
def __init__(self, parent):
***************
*** 251,278 ****
first = isfirst or self._type == 'GRSection'
while 1:
! # TODO: I **think** On-New-Record gets called here
! # TODO: (iff we are a section.) -- jason
! self.processTrigger('On-New-Record')
for child in self._children:
if child._type == "_content_":
! dest.write(child.getContent())
else:
# Handle GRSections specially as
# they require extra logic
if isinstance(child, GRSection):
-
# If this is the top-most section for a datasource,
# it needs to be called with processAsController.
if child._mymapper.toplevel:
- GDebug.printMesg(10, "Calling new controlling section")
child.processAsController(dest, mapper)
# ..otherwise call the GRSection's process method.
else:
! nextSection = child.process(dest, mapper,
isfirst=1,
islast=(nextSection == None) or \
(nextSection._name not in (child._childSections)),
--- 252,277 ----
first = isfirst or self._type == 'GRSection'
while 1:
! if isinstance(self, GRSection) :
! self.processTrigger('On-Process')
for child in self._children:
if child._type == "_content_":
! dest.write(child.getContent())
else:
# Handle GRSections specially as
# they require extra logic
if isinstance(child, GRSection):
# If this is the top-most section for a datasource,
# it needs to be called with processAsController.
if child._mymapper.toplevel:
+ GDebug.printMesg(10, "Calling new controlling section")
child.processAsController(dest, mapper)
# ..otherwise call the GRSection's process method.
else:
! nextSection = child.process(dest, mapper,
isfirst=1,
islast=(nextSection == None) or \
(nextSection._name not in (child._childSections)),
***************
*** 318,324 ****
ContainerElement.__init__(self, parent, 'GRSection')
self._childSections = []
self._validTriggers = {'PRE-SECTION':'Pre-Section',
! 'POST-SECTION':'Post-Section',}
def _buildObject(self):
if not hasattr(self,'name') or self.name == None:
--- 317,324 ----
ContainerElement.__init__(self, parent, 'GRSection')
self._childSections = []
self._validTriggers = {'PRE-SECTION':'Pre-Section',
! 'POST-SECTION':'Post-Section',
! 'ON-PROCESS':'On-Process'}
def _buildObject(self):
if not hasattr(self,'name') or self.name == None:
***************
*** 368,373 ****
--- 368,374 ----
c2.processDefault(dest, mapper)
+
#
# Used internally to determine next section to move
#
***************
*** 530,542 ****
class GRFirstRow(ContainerElement):
def __init__(self, parent):
ContainerElement.__init__(self, parent, 'GRFirstRow')
- # TODO: shouldn't be here
- # self._validTriggers = { 'ON-NEW-RECORD':'On-New-Record'}
def process(self, dest, mapper, isfirst, islast, firstSection, nextSection):
if isfirst:
- # TODO: shouldn't be here
- # self.processTrigger('On-New-Record')
nextSection = self.processChildren(dest, mapper, isfirst, islast,
firstSection, nextSection)
return nextSection
--- 531,539 ----
***************
*** 545,557 ****
class GRNotFirstRow(ContainerElement):
def __init__(self, parent):
ContainerElement.__init__(self, parent, 'GRNotFirstRow')
- # TODO: shouldn't be here
- # self._validTriggers = { 'ON-NEW-RECORD':'On-New-Record'}
def process(self, dest, mapper, isfirst, islast, firstSection, nextSection):
if not isfirst:
- # TODO: shouldn't be here
- # self.processTrigger('On-New-Record')
nextSection = self.processChildren(dest, mapper, isfirst, islast,
firstSection, nextSection)
return nextSection
--- 542,550 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/reports/src GRLayout.py,
James Thompson <=