Dear Folks:
I'm trying to run SmartClient code triggered from within SmartGWT code.
So I've written the following class:
public class ScriptHelper {
public static native void runJavascript(String javascript) /*-{
console.log("Trying to create window");
$wnd.isc.Window.create({
ID: "modalWindow",
title: "Modal Window",
autoSize:true,
autoCenter: true,
isModal: true,
showModalMask: true,
autoDraw: false,
closeClick : function () {console.log("CloseClick");},
items: [
$wnd.isc.IButton.create({
ID: "touchButton",
width: 120,
title: "Touch This"
})
]
});
console.log("Created Window "+$wnd.modalWindow);
console.log("Trying to show window");
$wnd.modalWindow.show();
console.log("ScriptHelper.runJavascript: Done with function");
//eval(javascript);
}-*/;
}
The code gets stuck at $wnd.modalWindow.show();
In the Chrome debugger, I see the following exception thrown:
TypeError: _4.duplicate is not a function at Object.isc_Window_makeBody [as makeBody]
_4 in this context is an Array of size 1, i.e., the list of items defined for the Window.
Versions:
Chrome 46.0.2490.33 beta (64-bit)
SmartClient Version: v9.1p_2015-09-01/PowerEdition Deployment (built 2015-09-01)
What am I missing?
Thanks for the help.
I'm trying to run SmartClient code triggered from within SmartGWT code.
So I've written the following class:
public class ScriptHelper {
public static native void runJavascript(String javascript) /*-{
console.log("Trying to create window");
$wnd.isc.Window.create({
ID: "modalWindow",
title: "Modal Window",
autoSize:true,
autoCenter: true,
isModal: true,
showModalMask: true,
autoDraw: false,
closeClick : function () {console.log("CloseClick");},
items: [
$wnd.isc.IButton.create({
ID: "touchButton",
width: 120,
title: "Touch This"
})
]
});
console.log("Created Window "+$wnd.modalWindow);
console.log("Trying to show window");
$wnd.modalWindow.show();
console.log("ScriptHelper.runJavascript: Done with function");
//eval(javascript);
}-*/;
}
The code gets stuck at $wnd.modalWindow.show();
In the Chrome debugger, I see the following exception thrown:
TypeError: _4.duplicate is not a function at Object.isc_Window_makeBody [as makeBody]
_4 in this context is an Array of size 1, i.e., the list of items defined for the Window.
Versions:
Chrome 46.0.2490.33 beta (64-bit)
SmartClient Version: v9.1p_2015-09-01/PowerEdition Deployment (built 2015-09-01)
What am I missing?
Thanks for the help.
Comment