[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gambas-bugtracker] Bug #3185: unable to close windows


http://gambaswiki.org/bugtracker/edit?object=BUG.3185&from=L21haW4-

Comment #6 by Bruce STEERS:

You could do the following to work around the problem...

After the modal window has closed destroy the Frm1 object.

Public Sub Button1_Click()

  Fm1.ShowModal
  Fm1 = Null  ' this will call the special method Fm1._free()

End


Then in Form1.class you can close Form2 in the Frm1._free() "special method" called when it is destroyed instead of the Form_Close() "event"

Public Sub _free()

  Fm2.Close 
  Message("it should have closed")

End

This works because the Modal window has closed and things are back to normal.

Respects



----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----

References:
[Gambas-bugtracker] Bug #3185: unable to close windows<bugtracker@xxxxxxxxxxxxxx>