SmartClient Version: SC_SNAPSHOT-2012-02-23_v8.2p/Pro Deployment (built 2012-02-23)
FireFox 10.0.1
I not been able to find documentation but I have seen this notation as an acceptable/compilable approach to using JavaScript in Java code. I am attempting to use this to copy to the clipboard:
private static native JavaScriptObject copyToClipBoard(String guid)/*
if (window.clipboardData) // Internet Explorer
{
window.clipboardData.setData("Text", guid);
}
else
{
unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
clipboardHelper.copyString(guid);
}
return(copyToClipBoard);
}*/;
This compiles but causes an umbrella exception on the declaration line.
FireFox 10.0.1
I not been able to find documentation but I have seen this notation as an acceptable/compilable approach to using JavaScript in Java code. I am attempting to use this to copy to the clipboard:
private static native JavaScriptObject copyToClipBoard(String guid)/*
if (window.clipboardData) // Internet Explorer
{
window.clipboardData.setData("Text", guid);
}
else
{
unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
clipboardHelper.copyString(guid);
}
return(copyToClipBoard);
}*/;
This compiles but causes an umbrella exception on the declaration line.
Comment