Re: GtkComboBox:: insert_text()
| From: | Christian Weiske | Date: | Sat, 19 Nov 2005 10:31:52 +0000 |
| Subject: | Re: GtkComboBox:: insert_text() | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6350@lists.php.net to get a copy of this message | ||
Tabber,
> GtkComboBox::insert_text does not function how I belive it is described in
>
> http://cweiske.dyndns.org/en/html/gtk/gtk.gtkcombobox.method.insert_text.html×ÇŸÑ*û.�ª Ñ
> ÑLÉð
>
> I am populating the combo box with a possible listings from my database, and
> want to use their unique ids as their index. But when I try to grab the
> selected index or use GtkComboBox::set_active I need to use the generated
> index.
The manual states:
Note that you can only use this method with combo boxes constructed with
the new_text() function.
As associative arrays don't exist in c as in php, they are converted to
a normal array, keys starting from 0.
You could create an translation array which translated the keys from
your db ids to sequential ones.
--
Regards/MfG,
Christian Weiske
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc