using lookup_widget

I have some "Segmentations Fault" problems using lookup_widget in a window

When I click in a Tlist's row, I want a string be added in Plist (just to be sure event works)
(and there come's seg fault)

Here is simplified window code :

// we assume all objects are contained in the window //
GtkWidget *mywindow(void)
	GtkWidget *EditWin;
	GtkWidget *TList;
	GtkWidget *PList;

	gchar *TListTitles[2]={"xxx","yyy"};
	gchar *PlistTitles[12]={"fff", etc...... };

	EditWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_object_set_data (GTK_OBJECT(EditWin), "EditWin",EditWin);

	TList = gtk_clist_new_with_titles(2,TListTitles);

	PList = gtk_clist_new_with_titles(12,PListTitles);
	gtk_object_set_data (GTK_OBJECT(EditWin),"pList",PList);

	return EditWin;

Here's the signal code of a selected row in TList:

gboolean RowSelect(GtkWidget *w, gint lig, gint col, GdkEvent *ev, gpointer d)
	gchar *x[12];
	GtkWidget *dList = lookup_widget(GTK_WIDGET(EditWin),"pList"); //here I want to get access to PList

	x[0]="selection ok";


	return TRUE;

Did I rightly used the gtk_object_get/set_data ?

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