[Gambas-user] Return variable from dialog
johnf
jfabiani at ...1109...
Sat Jan 7 22:54:28 CET 2006
On Saturday 07 January 2006 11:33, ron wrote:
> On Saturday 07 January 2006 15:30, Rohnny Stormo wrote:
> > Hi group.
> >
> > How can I return a value from a dialog or modal form.
> > Form1 call form2, when form2 close it do return a value.
> >
> > Tried this but not allowed.
> >
> > STATIC PUBLIC FUNCTION Run() AS Long
> > DIM hForm AS FpopupVarer
> >
> > hForm = NEW FpopupVarer
> > hForm.ShowModal()
> > RETURN varenr
> > END
> >
> > and after study, it seems like this does not going to work. After
> > Showmodal has ended
> > the variable varenr are dead.
> >
> >
> > Regards Rohnny
>
> Where was varenr was alive ?
> No Dim and asign a value to it in this code.
>
> Beside of that, I believe the .Showmodal() keep running until
> close of the form. The Return varenr is done after the close.
> If varenr is declared and fill inside the form you don't have it anymore.
>
> Ron
>
> > -------------------------------------------------------
one way
Set a Public var in the calling Form.
Public passstr as String
Then in the modal form just before you close
callingForm.passstr = someString from the modal form.....
me.close()
John
More information about the User
mailing list