Canvas error



Hello

I am porting a code of Tcl/Tk to Gnome, but the follow code ever show 
me error:

gint on_menuItemLine_activate (GtkWidget *widget, gpointer *gdata)
{
  GnomeCanvasPoints * points;
  GnomeCanvasGroup * group;
  GnomeCanvasItem * item;
 
  group = gnome_canvas_root(GNOME_CANVAS(gdata));
  points = gnome_canvas_points_new(3);

  points->coords[0] = 150;
  points->coords[1] = 100;
  points->coords[2] = 200;
  points->coords[3] = 100;
  points->coords[4] = 200;
  points->coords[5] = 200;

  item = gnome_canvas_item_new(group,
                               gnome_canvas_line_get_type(),
                               "points", points,
                               "fill_color_rgba", 0xff000080,
                               "width_pixels", 3,
                               NULL);
    
  group = GNOME_CANVAS_GROUP(gnome_canvas_item_new(group,
                                                   
gnome_canvas_group_get_type(),
                                                   "x", 10.0,
                                                   "y", 10.0,
                                                   NULL));
} 

The error in executing is the follow:

Gtk-CRITICAL **: file gtkobject.c: line 939 (gtk_object_add_arg_type): 
assertion `arg_type > GTK_TYPE_NONE' failed.
 
GnomeUI-WARNING **: gnome_canvas_item_construct(): could not find 
argument "points" in the `GnomeCanvasLine' class ancestry   
     
Thanks 


-- 
Fabio Ospitia Trujillo                 Tel.:  661 3837
Linux Colombia Ltda.              Fax:   667 6596
Av 6AN # 24N - 43 Segundo Piso,  Cali    E-mail: 
fot@linuxcolombia.com.co







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