[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5813 - trunk/gnue-navigator/src
From: |
jamest |
Subject: |
r5813 - trunk/gnue-navigator/src |
Date: |
Thu, 13 May 2004 19:26:47 -0500 (CDT) |
Author: jamest
Date: 2004-05-13 19:26:46 -0500 (Thu, 13 May 2004)
New Revision: 5813
Modified:
trunk/gnue-navigator/src/GNObjects.py
trunk/gnue-navigator/src/UIgtk2.py
trunk/gnue-navigator/src/UIwin32.py
trunk/gnue-navigator/src/UIwx.py
Log:
parameter support moved into GNStep
parameters should now work with forms
**completely untested**
Modified: trunk/gnue-navigator/src/GNObjects.py
===================================================================
--- trunk/gnue-navigator/src/GNObjects.py 2004-05-13 16:39:26 UTC (rev
5812)
+++ trunk/gnue-navigator/src/GNObjects.py 2004-05-14 00:26:46 UTC (rev
5813)
@@ -122,9 +122,12 @@
'exclude_xml':None }
# get parameters
- for child in step._children:
- if child._type=="GNParameter":
- params[child.name]=child.value
+ # moved to GNStep - jst
+ #for child in step._children:
+ # if child._type=="GNParameter":
+ # params[child.name]=child.value
+
+ params.update(self._params)
i = self
while i._parent!=None:
@@ -164,14 +167,22 @@
class GNStep(GNObject):
def __init__(self, parent):
GNObject.__init__(self, parent, type="GNStep")
-
+ self._params = {}
+
+ self._inits = [self.primaryInit]
+
+ def primaryInit(self):
+ for child in self._children:
+ if child._type=="GNParameter":
+ self._params[child.name]=child.value
+
def _buildObject(self):
self._controller = self.findParentOfType('GNProcesses')
def run(self):
try:
GDebug.printMesg(1,'Running %s %s' % (self.type, self.location))
- self._controller._clientHandlers[self.type](self)
+ self._controller._clientHandlers[self.type](self, self._params)
except KeyError:
print 'Error! Unknown step type "%s"' % self.type
Modified: trunk/gnue-navigator/src/UIgtk2.py
===================================================================
--- trunk/gnue-navigator/src/UIgtk2.py 2004-05-13 16:39:26 UTC (rev 5812)
+++ trunk/gnue-navigator/src/UIgtk2.py 2004-05-14 00:26:46 UTC (rev 5813)
@@ -357,7 +357,7 @@
def runFormFromTrigger(self, form, parameters = {}):
self.setStatus('running form %s from trigger' % formfile)
- self._runForm(form)
+ self._runForm(form, self._params)
def runForm(self, step, parameters = {}):
# This is the code executing in the new thread. Simulation of
Modified: trunk/gnue-navigator/src/UIwin32.py
===================================================================
--- trunk/gnue-navigator/src/UIwin32.py 2004-05-13 16:39:26 UTC (rev 5812)
+++ trunk/gnue-navigator/src/UIwin32.py 2004-05-14 00:26:46 UTC (rev 5813)
@@ -300,7 +300,7 @@
else:
formfile = step.location
- self._runForm(formfile, parameters)
+ self._runForm(formfile, self._params)
def _runForm(self, formfile, parameters):
Modified: trunk/gnue-navigator/src/UIwx.py
===================================================================
--- trunk/gnue-navigator/src/UIwx.py 2004-05-13 16:39:26 UTC (rev 5812)
+++ trunk/gnue-navigator/src/UIwx.py 2004-05-14 00:26:46 UTC (rev 5813)
@@ -221,13 +221,14 @@
self._runForm(form)
def runForm(self, step, parameters = {}):
+ # parameters are now part of the step in _params
+
# This is the code executing in the new thread. Simulation of
# a long process (well, 10s here) as a simple loop - you will
# need to structure your processing so that you periodically
# peek at the abort variable
- # TODO: Pass parameters
-
+ #print step._params
if os.path.basename(step.location) == step.location:
try:
formdir = gConfigNav('FormDir')
@@ -237,7 +238,7 @@
else:
formfile = step.location
- self._runForm(formfile, parameters)
+ self._runForm(formfile, step._params)
def _runForm(self, formfile, parameters):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5813 - trunk/gnue-navigator/src,
jamest <=