Re: newbie directions?



thank you all for your help and your advices. i was still going a bit mad as i had a gtkcomboboxentry and
gtk_combo_set_popdown_strings(GTK_COMBO(tableCombo),  tableNames);
was failing  with the errors:
invalid cast from gtkcomboboxentry  to gtkcombo
gtk_combo_set_popdown....: assertion GTK_IS_COMBO (combo) failed

i thought that class gtkcomboboxentry is a subclass of gtkcombobox which in turn is a subclass of gtkcombo and as a result it would inherit all its properties and methods. isnt that the case? i also tried it with gtkcombobox with no luck. anyway, it worked fine only when i changed widgets to gtkcombo in the xml file.

thanks again.

-yiannis



John Medrano wrote:

--- Yiannis Gatsoulis <menig leeds ac uk> wrote:
hi,

accept my apologies since probably this has been
asked. i have already looked on the web and the email list for all the documentation but they are a bit confusing or most of them are for c++
(using gtkmm).

i am a newbie in Gtk. i am trying to implement a
graphical application and for that i am using Glade to design the interface, libglade for the translation from the xml file and C with gtk-2.0 for
the coding.

Verify that you are using Glade2 with GTK-2.0.

my question is: is there a newbie introductory
tutorial for these.

secondary questions that i am trying to resolve are:
1. is there a way that  glade_get_widget_tree or
smth similar to read the widget tree from the xml file by passing as an argument the filename instead of a GtkWidget so i can retrieve a
particular widget?

Sorry I can not help you here.

2. how can i populate a gtk combo box entry?
preferably from the initialisation.

GList             *tableNames = NULL;
GtkWidget         *tableCombo;

/* Initialize Table Name Combo Box */
tableCombo = lookup_widget(GTK_WIDGET(mainWindow),
"comboSelTable");
/* lookup_widget routine is provided by glade in
generated file support.c*/

/* tblname is array with names for combo box */
for(i = 0; i < NUMTBLS; i++) tableNames = g_list_append(tableNames, tblname[i]);
gtk_combo_set_popdown_strings(GTK_COMBO(tableCombo),
tableNames);



3. what are the GTK_ENTRY, GTK_EDITABLE, etc? they
seem to me like they are macros so they perform casting. but where can i
find them?

First, locate gtk-2.0 header files on the system with:
pkg-config --cflags gtk+-2.0

The header files are under <your path>/gtk-2.0/gtk.

sorry for these too newbie questions...

thanks,

--
-yiannis


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



                
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail



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