Re: [Vala] ComboBoxEntry+GtkBuilder



Hi.

*****************Code*********************************************
var url_repo  = builder.get_object  ("url_repo") as ComboBoxEntry;
 url_repo.append_text("lolo");

 string url  = url_repo.get_active_text();
stdout.printf("%s\n",url);

*****************Code*********************************************

This is bad thing to do. You should only use simplified text API on
those GtkComboBoxEntries that have been constructed using
gtk_combo_box_entry_new_text(). And since GtkBuilder doesn't construct
combo entry this way, you should really avoid using this API.

Secondly, are you sure some text is selected when you code runs? If
nothing is selected, nothing will be returned.

Tadej

-- 
Tadej Borovšak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com



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