Re: Gtk::ComboBox::get_active_id() documentation
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Phil Wolff <adiabat hughes net>
- Cc: gtkmm-list gnome org
- Subject: Re: Gtk::ComboBox::get_active_id() documentation
- Date: Tue, 09 Oct 2012 09:17:01 +0200
void Gtk::ComboBox::get_active_id(const Glib::ustring & active_id)
calls the gtk+ function
gboolean gtk_combo_box_set_active_id(GtkComboBox *combo_box, const gchar
*active_id)
The documentation has been copied from the gtk+ function.
There are two errors with the gtkmm function.
1. It should be called set_active_id.
2. It should return bool.
The best thing to do now would be to deprecate
void Gtk::ComboBox::get_active_id(const Glib::ustring & active_id)
and add a new function that also calls gtk_combo_box_set_active_id(),
bool Gtk::ComboBox::set_active_id(const Glib::ustring & active_id)
When API can be broken, the erroneous get_active_id() can be removed.
It's possible that the bug will be fixed as a result of your message to
the gtkmm-list, but if you want to be sure it won't be forgotten, you
should file a bug report in Bugzilla.
Kjell
2012-10-08 20:07, Phil Wolff skrev:
The documentation says
void Gtk::ComboBox::get_active_id(const Glib::ustring & active_id)
...
Changes the active row of combo_box...
...
Returns: true if a row with a matching ID was found...
Void, but it returns a value?
g++ says no, it can't return a value.
If it can't return a value, and it changes the active row, why is it
called "get..." rather than "set..."?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]