> There seems to be workaround for this bug. > Instead of this: > > Public Form1 As New FForm1 > Public Form2 As New FForm2 > > Public Sub Main() > > If Form1.ShowModal() = 666 Then > Form2.ShowModal() > Endif > > End > > > This works: > > Public Form1 As New FForm1 > Public Form2 As FForm2 > > Public Sub Main() > > If Form1.ShowModal() = 666 Then > Form2 = New FForm2 > Form2.ShowModal() > Endif > > End > > At least this workaround works with revision 3117. > > Jussi >
Gambas decides that the first shown window is the "main" window, and that closing it closes all other ones. So when Form1.ShowModal() returns, Form2 has been destroyed, and you get an "invalid" object. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user