[Gambas-user] Return variable from dialog

ron ronstk at ...239...
Sat Jan 7 20:33:21 CET 2006


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




> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 




More information about the User mailing list