[Webkit-unassigned] [Bug 20177] New: LiveConnect does not work returning arrays from Java applet to JavaScript
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 25 18:15:43 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=20177
Summary: LiveConnect does not work returning arrays from Java
applet to JavaScript
Product: WebKit
Version: 525.x (Safari 3.1)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: lindholm at gmail.com
I am having trouble returning arrays of strings from a Java applet to
JavaScript on Safari 3.1.2. It works fine on Firefox 3.0.1.
Here's the documentation on how it's supposed to work:
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:LiveConnect_Overview:Data_Type_Conversions:JavaScript_to_Java_Conversions
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:LiveConnect_Overview:Data_Type_Conversions:Java_to_JavaScript_Conversions
Here's are two simple files demonstrating the problem. Compile test19.java with
javac test19.java. Under firefox, you will see two diagnostic alerts followed
by "Success!" On Safari the diagnostics will be obviously wrong and then the
script will halt.
test19.html:
<html>
<head>
<title>tests whether applets can return string arrays</title>
</head>
<script type="text/javascript">
function clicker ()
{
var arr;
arr = document.test19.test ();
alert (typeof arr);
alert (arr.toString ());
if (arr[0] == "foo" && arr[1] == "bar")
alert ("success!");
else
alert ("failure!");
}
</script>
<body>
<button onclick="clicker ()">Write Config</button>
<applet name="test19" code="test19.class" width="1" height="1"
mayscript></applet>
</body>
</html>
test19.java:
import java.applet.Applet;
public class test19 extends Applet
{
public void init () { }
public void start () { }
public void stop () { }
public void destroy () { }
public String [] test ()
{
String [] ret = new String[2];
ret[0] = "foo";
ret[1] = "bar";
return ret;
}
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list