Builder4/WindowRooView.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 27 Aug 2014 07:36:40 +0000 (15:36 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 27 Aug 2014 07:36:40 +0000 (15:36 +0800)
Builder4/WindowRooView.js
Builder4/WindowRooView.vala

Builder4/WindowRooView.bjs
Builder4/WindowRooView.js
Builder4/WindowRooView.vala

index 35ecdfd..ad933ec 100644 (file)
@@ -71,7 +71,7 @@
                                     "listeners": {
                                         "drag_drop": "  ( ctx, x, y,time, ud) => {\n    return false;\n    /*\n\tprint(\"TARGET: drag-drop\");\n        var is_valid_drop_site = true;\n        \n         \n        Gtk.drag_get_data\n        (\n                w,         // will receive 'drag-data-received' signal \n                ctx,        /* represents the current state of the DnD \n                this.get('/Window').atoms[\"STRING\"],    /* the target type we want \n                time            /* time stamp \n        );\n                        \n                        \n                        /* No target offered by source => error \n                       \n\n\treturn  is_valid_drop_site;\n\t*/\n}",
                                         "show": "  ( ) => {\n    this.inspector.show();\n}",
-                                        "script_alert": "function (self, frame, message) {\n\n}"
+                                        "script_alert": " (dialog) => {\n     print(dialog.get_message());\n}"
                                     },
                                     ".GLib.DateTime:lastRedraw": "null",
                                     ".WebKit.WebInspector:inspector": "",
index 87c8f99..bc1c1e4 100644 (file)
@@ -174,8 +174,8 @@ WindowRooView=new XObject({
                                 show : ( ) => {
                                     this.inspector.show();
                                 },
-                                script_alert : function (self, frame, message) {
-                                
+                                script_alert : (dialog) => {
+                                     print(dialog.get_message());
                                 }
                             },
                             id : "view",
index 301bd03..807a46a 100644 (file)
@@ -438,8 +438,8 @@ public class Xcls_WindowRooView : Object
             this.el.show.connect(   ( ) => {
                 this.inspector.show();
             } );
-            this.el.script_alert.connect( function (self, frame, message) {
-            
+            this.el.script_alert.connect(  (dialog) => {
+                 print(dialog.get_message());
             } );
         }