gnope php gtk gui gnope.org  

Gtk2_IndexedComboBox is in PEAR now

 
Post new topic   Reply to topic    gnope.org Forum Index -> Gtk2 PEAR packages
View previous topic :: View next topic  
Author Message
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Tue Mar 21, 2006 3:01 pm    Post subject: Gtk2_IndexedComboBox is in PEAR now Reply with quote

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

PostPosted: Fri Mar 31, 2006 5:40 pm    Post subject: Reply with quote

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

PostPosted: Fri Mar 31, 2006 8:14 pm    Post subject: Reply with quote

I'll have a look.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed Apr 05, 2006 9:20 am    Post subject: Reply with quote

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

PostPosted: Wed Apr 05, 2006 3:04 pm    Post subject: Reply with quote

Thank you.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> Gtk2 PEAR packages All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.