Re: Launching a form with paramaters

Alex King <[email protected]>
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
On Sun, Sep 12, 2004 at 03:35:31PM -0500, Jason Cater wrote:
> I haven't used them much, but it sounds almost you're wanting one of our 
> "dialogs". These are alot like runForm, but work more like what you're 
> describing. Look at gnue-samples/testcases/forms/gauntlet/ for an example of 
> a dialog. Dialogs are embedded in your main form and are called using 
> activateDialog(). They can also return values to the parent form. 
> 
Thanks for the tip, I'll check it out, this could be exactly what I
want.

> But to answer your question, we haven't added that level of locking to 
> runForm. I'm also doubtful we've added a way to return a value too, though it 
> *might* be possible to use python's global namespace to do it. I.e., declare 
> a variable "global".  I haven't tested this and don't know if it would work 
> or not.
> 
I tried using python globals to pass vlues between forms but it didn't
seem to work (in forms 0.5.5).

Alex

> -- Jason 
> 
> On Sunday 12 September 2004 02:55 pm, Alex King wrote:
> > I'm running forms version 0.5.5 because I'm running the version in
> > debian testing, but I also downloaded 0.5.6 and checked the relavant
> > code.
> >
> > I'll pull a version form svn and use that.
> >
> > Another thing, is it possible to return a value to a "parent" form
> > easily (ie, programatically, without storing a value in the database?)
> > Is it possible to have the parent form wait on the child?
> >
> > I am thinking of how to implement a selector widget that is more complex
> > than a simple drop-down box, and I was thinking of using another form to
> > do this.
> >
> > Alex
> >
> > On Sun, Sep 12, 2004 at 11:58:28AM -0500, Jason Cater wrote:
> > > Alex,
> > >
> > > Are you running a recent release, or from our code repository? We've
> > > fixed this recently in our source tree, but it hasn't made it into a
> > > release yet.
> > >
> > > -- Jason
> > >
> > >
> > > On Sun, 12 Sep 2004 18:07:31 +1200
> > >
> > > Alex King <[email protected]> wrote:
> > > > In the forms developers guide, it states:
> > > > >the trigger would look like:
> > > > >form.runForm( 'myform.gfd', { 'division' : 101 } )
> > > > >That is, the parameters would be passed to runForm as a Python
> > > > >dictionary.
> > > >
> > > > However this usage produces a traceback.  I need to launch another form
> > > > from a trigger, and to pass it a value.  I am guessing ether the above
> > > > usage is obselete, or it hasn't been implemented yet.
> > > >
> > > > Anyone know how I can do this?
> > > >
> > > > Alex
> > > >
> > > >
> > > > _______________________________________________
> > > > Gnue mailing list
> > > > [email protected]
> > > > http://lists.gnu.org/mailman/listinfo/gnue
> > >
> > > _______________________________________________
> > > Gnue mailing list
> > > [email protected]
> > > http://lists.gnu.org/mailman/listinfo/gnue
> >
> > _______________________________________________
> > Gnue mailing list
> > [email protected]
> > http://lists.gnu.org/mailman/listinfo/gnue
> 
> 
> _______________________________________________
> Gnue mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/gnue
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.