[Gambas-user] Bug affecting to ShowModal
Benoît Minisini
gambas at ...1...
Sun Aug 15 14:57:54 CEST 2010
> 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
More information about the User
mailing list