problems with accessing GtkWidgets in arrays (arrays of structures)
- From: Ed Sweetman <ed sweetman wmich edu>
- To: gtk-app-devel-list gnome org
- Subject: problems with accessing GtkWidgets in arrays (arrays of structures)
- Date: 19 Feb 2002 19:23:16 -0500
Ok, maybe I'm just completely missing something but I'm doing something
like this
struct row {
GtkWidget *labela;
GtkWidget *labelb;
};
row rows[10];
for(x=0;x<10;x++){
rows[x].labela = gtk_label_new("label");
rows[x].labelb = gtk_label_new("label");
}
for(x=0;x<10;x++){
gtk_widget_show(rows[x].labela);
gtk_widget_show(rows[x].labelb);
}
for(x=0;x<10;x++){
gtk_widget_realize(rows[x].labela);
gtk_widget_realize(rows[x].labelb);
}
Now if i do label1 through label20 individually they work. Doing it this
way doesn't, however.
In between setting the labels and showing them, I attach them to a
table. Again, everything works when I revert to explicitly making each
a separate GtkWidget *widget; declaration. As it is now nothing shows
up when it should, but nothing is locked up or errors out. It's like it
just doesn't exist.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]