Re: GPtrArray



Hi Federico.
Try 3 things:
Post the complete code. There are some signal handlers missing.
Put good names in signal handlers so we can easily read and identify them.
drawingArea_expose_event
drawingArea_clic_event
button6_clic_event

You hace many lines which could be in your glade file:
 gtk_window_set_title(GTK_WINDOW(desenho->window), "Drawing Areas");
 gtk_widget_set_size_request(desenho->window, 400, 300);
 gtk_container_add (GTK_CONTAINER (desenho->window), desenho->drawingArea);
 GTK_WIDGET_SET_FLAGS (desenho->drawingArea, GTK_CAN_FOCUS);
 gtk_widget_add_events ( ....


Verify that the names of the objects in the XML are correct: "window2"
and "drawing_area".
desenho->window     = glade_xml_get_widget(xml, "window2");
desenho->drawingArea= glade_xml_get_widget(xml, "drawing_area");

Add a line:
g_assert(desenho->window != NULL);
g_assert(desenho->drawingArea != NULL);
if some of thoose fail just in the start, you have something bad with the names.

In your signal handler

g_print("Can i read this before the first error?\n");
  gdk_window_clear(desenho->drawingArea->window);
g_print("Can i read this before the second error?\n");
  g_ptr_array_remove_range(desenho->parray, 0, desenho->parray->len);
g_print("Can i read this at all after both error?\n");





2009/3/24 frederico schardong <frede sch gmail com>:
> Thanks for your help Diego, but the error is happening...
>
> anybody can help me?
>


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