[Gambas-user] getting warning when quitting running application
Bruce Steers
bsteers4 at gmail.com
Sun May 15 09:42:36 CEST 2022
On Thu, 12 May 2022 at 14:15, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>
> 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?
>>>
>>
Aah so it was a bug, errors were because Window.Persistent had been set.
The latest commit has fixed this but and now setting Application.MainWindow
seems to work without errors.
Thanks GianLuigi for finding the problem and Ben for fixing it :)
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220515/d769da57/attachment.htm>
More information about the User
mailing list