Re: Toggle Button Bug



On Thu, 2008-10-09 at 23:47 -0400, Ruben Safir wrote:
It seems to me that the togglebutton toggled() function has a but.  
Documentation
says that when called it will change the state of the object.

What documentation do you mean?

Do you mean the class documentation for Gtk::ToggleButton:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1ToggleButton.html#1fcff3b2f50b5a2e78b51339660f5c3a
also in the C documentation,
http://library.gnome.org/devel/gtk/stable/GtkToggleButton.html#GtkToggleButton.description
which says 
"To simply switch the state of a toggle button, use
gtk_toggle_button_toggled."
?

That sentence seems to be wrong because the function's documentation
http://library.gnome.org/devel/gtk/stable/GtkToggleButton.html#gtk-toggle-button-toggled
says "Emits the toggled signal on the GtkToggleButton. There is no good
reason for an application ever to call this function."

I will file a bug about that.

I suggest that you use gtk_toggle_button_set_active(), or
Gtk::ToggleButton::set_active() with gtkmm.

Note that gtkmm-list is generally a better place to get advice about
gtkmm.

  I  can't 
varify this behavior.
It calls the toogle signal but doesn't seem to change the state of the 
object.

Example Code Below:
http://www.nylxs.com/docs/workshops/toogle.cc
http://www.nylxs.com/docs/workshops/toogle.cc.html
http://www.nylxs.com/docs/workshops/toogle.h
http://www.nylxs.com/docs/workshops/toogle.h.html
http://www.nylxs.com/docs/workshops/toogle_main.c
http://www.nylxs.com/docs/workshops/toogle_main.c.html
[snip]

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]