[Gambas-user] getting warning when quitting running application

Bruce Steers bsteers4 at gmail.com
Thu May 12 15:15:43 CEST 2022


On Thu, 12 May 2022, 12:54 Gianluigi, <bagonergi at gmail.com> wrote:

>
>
> Il giorno gio 12 mag 2022 alle ore 12:03 Bruce Steers <bsteers4 at gmail.com>
> ha scritto:
>
>>
>>
>> On Thu, 12 May 2022 at 10:49, Gianluigi <bagonergi at gmail.com> wrote:
>>
>>>
>>>
>>> Il giorno gio 12 mag 2022 alle ore 11:41 Bruce Steers <
>>> bsteers4 at gmail.com> ha scritto:
>>>
>>>>
>>>>
>>>> On Thu, 12 May 2022 at 10:34, Gianluigi <bagonergi at gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> 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.
>>>>>
>>>>
>>>> All suggestions for improvement are always welcome :)
>>>>
>>>> I'm just saying the Application.MainWindow method sounded much better
>>>> than using a loop as i suggested but unfortunately it does not seem to be
>>>> as clean.
>>>> BruceS
>>>>
>>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>>>
>>>
>>> I probably misunderstood.
>>> You should attach an example
>>>
>>
>> I just modified a test app that makes an additional form with the loop to
>> test my initial solution.
>> Like i say using the Windows[] array exits clean, using
>> Application.MainWindow method does not
>>  (just uncomment the MainWindow allocation and comment the loop in
>> Form_Close)
>>
>> Is it a bug in Application.MainWindow method Ben?
>>
>> BruceS
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> Sorry but your code is not clear to me,
>

Yes for some it can be difficult to understand other people's ways, even
with simple lines of code.

>
I get errors on many of my applications if I set application.mainwindow
property.

Do you want to "clarify" all my other programs ? 😉

Did you try your code yourself?

I'm now solidly sticking with my 1st statement, use the Windows[] array as
using Application.MainWindow method is a dirty exit.

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


More information about the User mailing list