Gtk-CRITICAL **: IA__gtk_widget_child_focus: assertion `GTK_IS_WIDGET (widget)' failed when clicking on a wx.Notebook tab (but not scrolling)

Hi,

Everything is in the title, I get the following warning / error when clicking on a wx.Notebook tab but not when using the mouse wheel to go through the tabs:
Gtk-CRITICAL **: IA__gtk_widget_child_focus: assertion `GTK_IS_WIDGET (widget)’ failed

I have seen Mike’s answer on that thread* so I assume it is not important, but if any of you know how to fix it, or what is happening, I’d be glad to read it!

Thanks!

Damien

  • Mike’s answer: “If it’s not causing wxPython to crash, then you probably just have the debug version of wxPython installed.
    It lets you see stuff like that, but they don’t actually hurt anything. At least, that was what I gathered from several conversations
    about this problem on the wxPython mailing list.”

I have found what is happening, based on these assumptions:

  • Clicking on a notebook tab gives the focus to the clicked tab.
  • Scrolling on a notebook does not give the focus to the selected tab.
    However, to refresh the display, I destroy and re-create the notebook.
    So, GtK does not know what to focus and gives the warning / error shown above.

Is there any way to replace the content of a notebook tab without destroying it first?

Thanks,

Damien

···

Le mardi 22 mars 2016 18:05:34 UTC-4, Damien Ruiz a écrit :

Hi,

Everything is in the title, I get the following warning / error when clicking on a wx.Notebook tab but not when using the mouse wheel to go through the tabs:
Gtk-CRITICAL **: IA__gtk_widget_child_focus: assertion `GTK_IS_WIDGET (widget)’ failed

I have seen Mike’s answer on that thread* so I assume it is not important, but if any of you know how to fix it, or what is happening, I’d be glad to read it!

Thanks!

Damien

  • Mike’s answer: “If it’s not causing wxPython to crash, then you probably just have the debug version of wxPython installed.
    It lets you see stuff like that, but they don’t actually hurt anything. At least, that was what I gathered from several conversations
    about this problem on the wxPython mailing list.”

I meant a notebook page*, not tab

Thanks,

Damien

···

Le mercredi 23 mars 2016 11:32:18 UTC-4, Damien Ruiz a écrit :

I have found what is happening, based on these assumptions:

  • Clicking on a notebook tab gives the focus to the clicked tab.
  • Scrolling on a notebook does not give the focus to the selected tab.
    However, to refresh the display, I destroy and re-create the notebook.
    So, GtK does not know what to focus and gives the warning / error shown above.

Is there any way to replace the content of a notebook tab without destroying it first?

Thanks,

Damien

Le mardi 22 mars 2016 18:05:34 UTC-4, Damien Ruiz a écrit :

Hi,

Everything is in the title, I get the following warning / error when clicking on a wx.Notebook tab but not when using the mouse wheel to go through the tabs:
Gtk-CRITICAL **: IA__gtk_widget_child_focus: assertion `GTK_IS_WIDGET (widget)’ failed

I have seen Mike’s answer on that thread* so I assume it is not important, but if any of you know how to fix it, or what is happening, I’d be glad to read it!

Thanks!

Damien

  • Mike’s answer: “If it’s not causing wxPython to crash, then you probably just have the debug version of wxPython installed.
    It lets you see stuff like that, but they don’t actually hurt anything. At least, that was what I gathered from several conversations
    about this problem on the wxPython mailing list.”