gnue
[Top][All Lists]
Advanced

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

[GNUe] Executing forms by instantiating GFInstance


From: Adrian Maier
Subject: [GNUe] Executing forms by instantiating GFInstance
Date: Fri, 17 Nov 2006 13:49:55 +0200

Hello,

I am still trying (without much success) to execute a gfd form with
the ability to
specify programatically the file, the user and the password. I mean , i need to
specify them in code, not on the command line.

By instantiating the GFClient class i have been able to pass the file name
with client.ARGUMENTS.append('form.gfd').   However, passing the user
and the password in the same way proved to be impossible.

Two days ago,  i have been told that it should be possible to instantiate the
GFInstance class.  And that an example of how to do that can be found in
gnue-navigator's  sources.

#!/usr/bin/python

from gnue.forms.GFInstance import GFInstance
from gnue.forms.uidrivers import wx as ui
from gnue.forms.GFConfig import ConfigOptions
from gnue.common.apps.GClientApp import GClientApp

class gfdrunner(GClientApp):
  def __init__ (self, connections = None):
    GClientApp.__init__ (self, connections, 'forms', ConfigOptions)

  def run(self):
    instance = GFInstance(manager=self,
               connections=None,
               ui=ui, disableSplash=1)

#     instance.addFormFromFile('/home/am/src/gfaf/gnue/prod.gfd')
#     instance.activate()

r = gfdrunner()
r.run()

Traceback (most recent call last):
 File "./run.py", line 42, in ?
   r.run()
 File "./run.py", line 34, in run
   ui=ui, disableSplash=1)
 File "/usr/local/gnue/lib/python/gnue/forms/GFInstance.py", line
153, in __init__
   options = gConfigDict()
NameError: global name 'gConfigDict' is not defined

Any ideas about how to fix this ?


--
Adrian Maier




reply via email to

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