Problem Description: Write list ListView to notebook.
In the main function,
Win ==// used to create tab 1
In the Create_page_one function.
struct _add { *view; *win; } ADD; .... ADD adder;.. /* * * Create list */==
。。。
G_signal_connect (G_object (button1), "clicked", G_callback (Event_to_add), (Gpointer) &adder); Binding Event Event_to_add
In the Event_to_add function.
//function Prototypes: Event_to_add (Gtkwidget *widget, gpointer data)..... Gtkwidget*view; Gtkwidget*win; View= ((ADD *) data)View;win= ((ADD *) data)win; /** * Create a dialog box*/Dialog= Gtk_dialog_new_with_buttons ("Add New User", Gtk_window (Win), Gtk_dialog_modal, GTK_STOCK_OK, GTK_RESPONSE_OK, Gtk_stock_cancel, Gtk_response_cancel, NULL) ;。。。 /** * Add to List*/Model=Gtk_tree_view_get_model (Gtk_tree_view (view)); Gtk_list_store_append (Gtk_list_store model),&iter); Gtk_list_store_set (Gtk_list_store model),&iter, user_id, user_id, PASSWD, PASSWD, CLASS, Flag, CHOICE, FALSE,-1 ); 。。。
Why Python Exception <class ' gdb appears. Memoryerror ' > Cannot access memory at address question?