Re: libseed-list GooCanvas bindings
- From: Jonatan Liljedahl <lijon kymatica com>
- To: libseed-list gnome org
- Subject: Re: libseed-list GooCanvas bindings
- Date: Mon, 11 Jan 2010 01:29:18 +0100
Any news on this?
Jonatan Liljedahl wrote:
Hi there,
I just found seed and am looking forward to experiment with it.
Right now I'm trying to figure out how to use the GooCanvas bindings in
seed, but I can't get it to work:
var goo = imports.gi.GooCanvas;
var gtk = imports.gi.Gtk;
gtk.init(0,0);
var w = new gtk.Window();
var canvas = new goo.Canvas();
w.add(canvas);
canvas.set_bounds(0,0,1000,1000);
canvas.set_size_request(500,500);
var root = canvas.get_root_item();
var rect = new goo.CanvasRect({
parent:root,
x:10,y:10,
width:100,height:100,
line_width:5,
stroke_color:"blue"
});
//rect.set_parent(root);
//rect.parent = root;
print(rect.parent);
w.show_all();
gtk.main();
This just gives me a blank window, and it prints [null].
If I uncomment rect.set_parent(root) it prints [object GooCanvasGroup],
but still just a blank window. If I uncomment rect.parent=root I get:
** (seed:2615): CRITICAL **: PropertyError. unable to set property
`parent' of type `GooCanvasItem' from value of type `GObject' in
goocanvas.js at line 21
Any ideas? I'm on ubuntu 9.10 with recent packages.
BTW, perhaps Seed.printf() shouldn't add a newline like print() does?
/Jonatan
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]