| View previous topic :: View next topic |
| Author |
Message |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Tue Mar 21, 2006 3:01 pm Post subject: Gtk2_IndexedComboBox is in PEAR now |
|
|
Hello all,
My PHP-Gtk2 class Gtk2_IndexedComboBox is in PEAR now.
It gives you a GtkComboBox class that acceps key/value pairs, just as you know it from HTML select tags.
You can find it at:
http://pear.php.net/package/Gtk2_IndexedComboBox
and install it via
| Code: | | pear install Gtk2_IndexedComboBox |
Last edited by cweiske on Thu May 11, 2006 9:57 am; edited 1 time in total |
|
| Back to top |
|
 |
scott
Joined: 16 Feb 2006 Posts: 35
|
Posted: Fri Mar 31, 2006 5:40 pm Post subject: |
|
|
I am using Gtk2_IndexedComboBox in Structures_Form as the base for the Gtk2TextSelect element. This element is a simple text only select drop down like you would see in an HTML form. To clear the value of the element (reset the form) I try setting the active key to NULL. When I do that, I get the following error messages.
| Code: | (run.php:6128): Gtk-CRITICAL **: gtk_tree_path_append_index: assertion `index >= 0' failed
(run.php:6128): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion `path->depth > 0' failed
Warning: GtkListStore::get_iter(): invalid tree path in /usr/share/pear/Gtk2/IndexedComboBox.php on line 101
Warning: GtkListStore::get_value() expects argument 1 to be GtkTreeIter, null given in /usr/share/pear/Gtk2/IndexedComboBox.php on line 101
|
I know that NULL is not a valid key, but don't think this is an invalid use case. I think that Gtk2_IndexedComboBox should handle this gracefully and not try to call get_iter() or other methods if the key is not the right type.
Do you have any other suggestions for clearing the value? Or some better way to handle this?
Thanks,
Scott |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Fri Mar 31, 2006 8:14 pm Post subject: |
|
|
| I'll have a look. |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Wed Apr 05, 2006 9:20 am Post subject: |
|
|
| I just released version 0.1.0 that fixes NULL value problems. You can use NULL to unset the value. |
|
| Back to top |
|
 |
scott
Joined: 16 Feb 2006 Posts: 35
|
Posted: Wed Apr 05, 2006 3:04 pm Post subject: |
|
|
| Thank you. |
|
| Back to top |
|
 |
|