[Top][All Lists]

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

Re: [GNUe] Executing forms by instantiating GFInstance

From: Adrian Maier
Subject: Re: [GNUe] Executing forms by instantiating GFInstance
Date: Fri, 17 Nov 2006 16:11:03 +0200

On 11/17/06, Jan Ischebeck <address@hidden> wrote:
Hi Adrian,

I'm wondering about the error message, as gConfigDict should be created
by the constructor of GClientApp.
gConfigDict() is defined in, which is called in line 344 of (in common/src/apps).

If I call your application, I get the error that gConfigForms is
missing. This can be circumvented by adding the
following line to your constructor.

 self.configurationManager.registerAlias ('gConfigForms', 'forms')

thanks  ...

Finally you still have to setup datasources to get your app working.

Btw. which version of gnue are you using?

GNUe Forms Version 0.5.16
GNUe Common Version 0.6.4

Adrian Maier

Adrian Maier schrieb:
> 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()
> Traceback (most recent call last):
>  File "./", line 42, in ?
>  File "./", line 34, in run
>    ui=ui, disableSplash=1)
>  File "/usr/local/gnue/lib/python/gnue/forms/", line
> 153, in __init__
>    options = gConfigDict()
> NameError: global name 'gConfigDict' is not defined
> Any ideas about how to fix this ?

reply via email to

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