Gtk--: Error in creating Gnome::CanvasLine iterm in Gnome::Canvas



Run time err. How to create Gnome::CanvasLine Object?
I want to draw a line in a Gnome::Canvas. Here is my code ...

Gnome::CanvasPoints points(2);
points.push_back(Gnome::Art::Point(0,0));
points.push_back(Gnome::Art::Point(100,100));
Gnome::CanvasLine(group,points);

but the run time error message is:

 Gtk-CRITICAL **: file gtkobject.c: line 939 (gtk_object_add_arg_type):
 assertion `arg_type > GTK_TYPE_NONE' failed.

 GnomeUI-WARNING **: gnome_canvas_item_set(): could not find argument
 "points" in the `Gnome__CanvasLine' class ancestry

 What's the problem and how to create Gnome::CanvasLine in gnome--1.2?

 Please tell me ASAP. Thanks!!!


_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。http://www.hotmail.com/cn




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