2 //<Script type="Text/javascript">
4 XObject = imports.XObject.XObject
5 GtkClutter = imports.gi.GtkClutter;
8 // children are not added at init / but at show stage..
9 // listener is added on show..
10 // we should really add a hock to destroy it..
14 onConstruct : function() {
15 if (!this.items.length) {
16 XObject.fatal("Actor does not have any children");
19 this.items[0].pack = false;
25 if (!this.items.length) {
26 print ("Actor does not have any children");
29 var child = this.items[0];
33 //var contents = new Gtk.Button({ label: 'test' });
35 // print(JSON.stringify(this.items));
38 this.el = new GtkClutter.Actor.with_contents ( child.el) ;
40 XObject.prototype.init.call(this);