Re: missing ComboBox method




On Mar 21, 2005, at 6:15 PM, Jeff 'japhy' Pinyan wrote:

My Gtk2::ComboBox objects seem to be missing the get_active_text method.

sounds like you're not using gtk+ 2.6.x -- that method is new in gtk+ 2.6.0. here's the relevant code from GtkComboBox.xs in Gtk2 1.080:

  #if GTK_CHECK_VERSION (2, 6, 0)

  gchar_own * gtk_combo_box_get_active_text (GtkComboBox *combo_box);

  ...

it is rather trivial to implement; perhaps in the next stable series we could provide a fallback implementation for gtk+ < 2.6.


If you're considering subclassing Gtk2::ComboBox to add this method, be advised that you'll have another hoop to jump through: Gtk2::ComboBox's new_text method doesn't do class inheritence properly:

that's a gtk+ thing; gtk_combo_box_new_text() is a convenience function to create a GtkComboBox set up to do text entries.


--
I bring the rock, and provided it is fiscally responsible, I will bring the funk as well. And that's fo-shizzle.
        -- Saturday Night Live




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