seed r822 - trunk/tests/javascript



Author: hortont
Date: Fri Jan 30 00:21:35 2009
New Revision: 822
URL: http://svn.gnome.org/viewvc/seed?rev=822&view=rev

Log:
If you install a signal (from JS) which wants to return a GValue, and you return a JS number type, Seed segfaults (as you can see in this test. This shouldn't happen, but I'm not sure what should ...


Added:
   trunk/tests/javascript/gtype-signal-gvalue.js   (contents, props changed)

Added: trunk/tests/javascript/gtype-signal-gvalue.js
==============================================================================
--- (empty file)
+++ trunk/tests/javascript/gtype-signal-gvalue.js	Fri Jan 30 00:21:35 2009
@@ -0,0 +1,31 @@
+#!/usr/bin/env seed
+// Returns: 0
+// STDIN:
+// STDOUT:5
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+HelloWindow = new GType({       
+    parent: Gtk.Window.type,
+    name: "HelloWindow",
+    class_init: function(klass, prototype)
+    {
+        var HelloSignalDefinition = {name: "hello",
+                                     parameters: [GObject.TYPE_INT],
+                                     return_type: GObject.TYPE_VALUE};
+
+        hello_signal_id = klass.install_signal(HelloSignalDefinition);
+    }
+});
+
+w = new HelloWindow();
+
+w.signal.hello.connect(function(object, number, string)
+                       {
+                           return 5;
+                       });
+
+Seed.print(w.signal.hello.emit(2));
+



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