[Gambas-user] getting warning when quitting running application

Bruce Steers bsteers4 at gmail.com
Thu May 12 11:12:01 CEST 2022


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.



On Wed, 11 May 2022 at 21:47, Gianluigi <bagonergi at gmail.com> wrote:

>
>
> Il giorno mer 11 mag 2022 alle ore 22:15 Benoît Minisini <g4mba5 at gmail.com>
> ha scritto:
>
>> Le 11/05/2022 à 21:42, Charles Bukowski a écrit :
>> > It works perfectly!! With no warnings in console as well !!
>> > (I've used mine)
>> > Many thx
>> >
>>
>> When making a GUI problem, you should tell Gambas which window can be
>> considered the main window, by setting the Application.MainWindow
>> property.
>>
>> Then, closing that main window will automatically close all other
>> windows, and your program will quit gracefully (unless there are pending
>> file watches, timers, sockets...).
>>
>> See https://gambaswiki.org/wiki/comp/gb.qt4/application/mainwindow
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> One system may be to place this code in windows that can close the
> application:
>
> Public Sub Form_Close()
>
>   Application.MainWindow = Me
>
> End
>
> Regards
>
> Gianluigi
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220512/899c2643/attachment.htm>


More information about the User mailing list