Re: libseed-list GooCanvas bindings



I built seed from current git and now it works fine! Very nice.

Tim Horton wrote:
The latest (tarball, not Ubuntu package) releases of gobject-introspection/gir-repository/etc., and Seed from Git.

On Jan 15, 2010, at 08:11, Jonatan Liljedahl wrote:

Ok, that's good to hear :)
What versions of everything do you have?

/Jonatan

Tim Horton wrote:
Seems to work just fine now, actually!
On Sun, Jan 10, 2010 at 19:29, Jonatan Liljedahl <lijon kymatica com> wrote:
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

_______________________________________________
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]