[Gambas-user] getting warning when quitting running application

Gianluigi bagonergi at gmail.com
Thu May 12 11:32:03 CEST 2022


Il giorno gio 12 mag 2022 alle ore 11:13 Bruce Steers <bsteers4 at gmail.com>
ha scritto:

> Note. using the Windows array and .Close as I suggested exits cleanly with
> no warnings at all.
>
> Just setting Application.MainWindow = Me like Ben says does close all
> windows but I get all this on exit...
>
> (_aa:72471): Gtk-CRITICAL **: 10:06:51.207: gtk_im_context_reset:
> assertion 'GTK_IS_IM_CONTEXT (context)' failed
> (_aa:72471): Gtk-CRITICAL **: 10:06:51.207:
> gtk_im_context_set_client_window: assertion 'GTK_IS_IM_CONTEXT (context)'
> failed
> (_aa:72471): Gtk-CRITICAL **: 10:06:51.207: gtk_im_context_reset:
> assertion 'GTK_IS_IM_CONTEXT (context)' failed
> (_aa:72471): Gtk-CRITICAL **: 10:06:51.207: gtk_im_context_focus_out:
> assertion 'GTK_IS_IM_CONTEXT (context)' failed
> (_aa:72471): Gtk-CRITICAL **: 10:06:51.207: gtk_im_context_reset:
> assertion 'GTK_IS_IM_CONTEXT (context)' failed
>
> gbx3 [72471]: warning: circular references detected:
> gbx3:     1 Form1
> gbx3:     1 Spring
> gbx3 [72471]: warning: 17 allocation(s) non freed.
>

If one uses a loop to close all windows what good is Application.MainWindow
= Me?
Application.MainWindow = Me is only needed if you close 'the window' (one
of the windows in charge of closing the application) that correctly closes
the application.

To recap if I have only one Main window then on opening I will indicate the
main as Application.MainWindow, otherwise, if the windows assigned to that
task are more than one, my suggestion may be useful.

Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220512/af4c0531/attachment-0001.htm>


More information about the User mailing list