gtkmm checkmenuitem Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_
I have a Gtk::Window with a Gtk::CheckMenuItem member. Also, there is a function UpdateChecks() that updates whether the CheckMenuItem(s) should be checked or not, by using set_active() (within a Try and Catch(...)).
Application works fine. For some reason occasionally when I quit (and only after I quit) the program I get a set of Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed messages dumped into the terminal that I've run the program from.
What could be causing this?
Is there a better way to set the values. Meaning, can the Glib::ProxyProperty::propert_active be diverted to a function in my Gtk::Window class to set the check on or off depending on variables within my Gtk::Window?
Thanks for any help,
Several applications will display a message in
the terminal window, like the above.
Usually it can just be ignored, has no importance
for the function of the application.
While it doesn't affect the program or my sleep, it's a neatness thing that I can't personally ignore.
In my UpdateChecks function if I check the objects using m_CheckMenu.gobj()!=NULL prior to calling a set_active then this avoids the error message dump.
This would seem to me that when the application is quitting, somehow this function is being called after the window has destroyed the checkmenu objects but before the window is fully destroyed. However, as of yet, I've found nothing in my code that would cause this, certainly nothing in the destructor calls functions.
Anyway, still thing there should be a way to divert the property_value function to use an outside function within my Window to set the value. Like setting up a callback...or attaching a toggled function using connect. Haven't found anything documented anywhere though....
If anyone knows how, please let me know...
|All times are GMT -5. The time now is 07:37 PM.|