For a more readable project overview, see my homepage
stefanhaustein / minijoe Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/minijoe
Automatically exported from code.google.com/p/minijoe
For a more readable project overview, see my homepage
1. Simple Javascript used to print given string length:
===========
var text = "hello";
var txtlen = text.length;
document.write(txtlen);
===========
What is the expected output? What do you see instead?
1. Expected output should be 5.
2. Actual result is 9. [ basically, it initialized obj with "undefined" and
always return "undefined" length as 9.
What version of the product are you using? On what operating system?
1. initial version 1.0 from SVN.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 9 Jan 2009 at 6:08
What steps will reproduce the problem?
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var img = new Image();
img.src = 'images/star.png';
ctx.drawImage(img,0,0);
What is the expected output? What do you see instead?
The expected output, is that star.png shows in the upper-lefthand corner of
the canvas. Instead, I get an exception. Exception included below. The
same javascript code works fine in a browser.
What version of the product are you using? On what operating system?
I've checked out the latest from the trunk. I am using windows XP, with
WTK 2.5.1.
Please provide any additional information below.
[wtkrun] java.lang.NullPointerException
[wtkrun] at com.google.minijoe.sys.JsFunction.eval(+2248)
[wtkrun] at com.google.minijoe.sys.JsFunction.exec(+70)
[wtkrun] at com.google.minijoe.samples.runtime.MjRuntime.commandAction(+89)
[wtkrun] at javax.microedition.lcdui.List.callKeyPressed(+80)
[wtkrun] at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+198)
[wtkrun] at
javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
[wtkrun] at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+127)
[wtkrun] at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
[wtkrun] at
com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+114)
[wtkrun] at
com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)
[wtkrun] com.google.minijoe.sys.JsException: Error at line 3 (pc:0x21):
ReferenceError: java.lang.NullPointerException
[wtkrun] at com.google.minijoe.sys.JsFunction.eval(+3009)
[wtkrun] at com.google.minijoe.sys.JsFunction.exec(+70)
[wtkrun] at com.google.minijoe.samples.runtime.MjRuntime.commandAction(+89)
[wtkrun] at javax.microedition.lcdui.List.callKeyPressed(+80)
[wtkrun] at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+198)
[wtkrun] at
javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
[wtkrun] at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+127)
[wtkrun] at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
[wtkrun] at
com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+114)
[wtkrun] at
com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)
Original issue reported on code.google.com by [email protected]
on 13 Apr 2009 at 4:53
There's a typo in JsDate.java when declaring the prototype for
"toTimeString." The prototype declares the method as "toTimeSring" (missing
't').
Original issue reported on code.google.com by [email protected]
on 9 Jun 2009 at 3:57
JavaScript date.toString() should return a date/time string in local time
and not UTC. The bug is in JsDate.toString(), which should call the other
toString method with the "utc" parameter set to false.
Original issue reported on code.google.com by [email protected]
on 9 Jun 2009 at 4:07
public Element getChildById(String id) {
int childCount = this.getChildCount();
Element currChild = null;
for (int i=0; i < childCount; i++) {
if (this.getChildType(i) == this.ELEMENT) {
currChild = this.getElement(i);
if (currChild != null &&
id.equals(currChild.getAttributeValue("id"))
) {
break;
} else if (currChild.getChildCount() > 0) {
currChild.getChildById(id);
}
}
}
return currChild;
}
Above is the current implementation. If there is no child element with the
specified id, the function will traverse through and return the last child. Am
I right?
Original issue reported on code.google.com by [email protected]
on 26 Dec 2010 at 12:35
What steps will reproduce the problem?
1. Run the following script:
works();
fails();
function fails() {
var mychars = new Array("a","b");
var x;
for (x in mychars) {
print("x:"+x);
}
}
function works() {
var mychars = new Array("a","b");
//var x; <----- local variable commented
for (x in mychars) {
print("x:"+x);
}
}
What is the expected output? What do you see instead?
Both For...In statements should produce valid print results.
works() emits:
x:0
x:1
fails() emits:
x:java.util.Vector$1@1ffb8dc
x:java.util.Vector$1@1ffb8dc
What version of the product are you using? On what operating system?
minijoe-1.0.zip
Windows XP
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Mar 2009 at 9:47
What steps will reproduce the problem?
Try to execute the script code as below:
var array = new Array();
array.push("a");
array.push("b");
var len = array.length;
What is the expected output? What do you see instead?
The value of "len" must be 2,but actually it is 6.
What version of the product are you using? On what operating system?
1.0, windows xp sp2
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 24 Jul 2009 at 6:18
[deleted issue]
The method date.getTimezoneOffset returns a value in milliseconds from the
call TimeZone.getDefault().getOffset(). That value should be converted to
minutes, which is the expected unit in the JavaScript API. The problem is
in the JsDate.evalNative() method, case ID_GET_TIMEZONE_OFFSET.
Original issue reported on code.google.com by [email protected]
on 9 Jun 2009 at 4:04
What steps will reproduce the problem?
1. In JavaScript use a try/catch around the entire code in a file
2. compile
What is the expected output? What do you see instead?
Any errors through should be caught.
What version of the product are you using? On what operating system?
Minijoe v1.0 + Windoze X-peeper
Please provide any additional information below.
CODE:
try {
.... any code here
} catch (e) {
print(e);
}
STACKTRACE:
com.google.minijoe.compiler.CompilerException: Unresolved Jump Label:
finally=481523300 at line: 0
at
com.google.minijoe.compiler.visitor.CodeGenerationVisitor.writeCodeBlock(+126)
at com.google.minijoe.compiler.visitor.CodeGenerationVisitor.visit(+90)
at com.google.minijoe.compiler.Eval.compile(+61)
at net.xxx.j2me.xxx.xxxEnvironment.compile(+82)
at net.xxx.j2me.xxx.xxxEnvironment.runScript(+4)
at net.xxx.j2me.xxx.xxxEnvironment.<init>(+467)
at net.xxx.j2me.xxx.xxx.startApp(+116)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
** package/product names and domain changed for privacy.
Original issue reported on code.google.com by [email protected]
on 24 Apr 2009 at 2:01
I found this bug on JsObject method evalNative line 874.
stack.setInt(sp, stack.getString(sp).length());
stack is empty. I solved it by replace this line by:
stack.setInt(sp, ((String)this.value).length());
Original issue reported on code.google.com by [email protected]
on 11 May 2014 at 4:15
What steps will reproduce the problem?
1. eg. Given the following two statements both will print but only the
second should print.
if ('a' >= 'b') { print(">="); }
if ('a' <= 'b') { print("<="); }
2. < and > comparisons are also incorrect.
3.
What is the expected output? What do you see instead?
I expect 'a' to be <= to 'b' and not >=.
What version of the product are you using? On what operating system?
minijoe-1.0.zip Windows XP.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2009 at 6:20
What steps will reproduce the problem?
1. 'LOWER'.toLowerCase()
2.
3.
What is the expected output? What do you see instead?
expected:lower
actual:tolowercase
What version of the product are you using? On what operating system?
JsObject R41
Please provide any additional information below.
I think it should be:
stack.setObject(sp, stack.getString(sp).toLowerCase());
Was changed to:
stack.setObject(sp, stack.getString(sp + 2).toLowerCase());
Same for toUppercase.
Original issue reported on code.google.com by [email protected]
on 16 Mar 2009 at 11:04
[deleted issue]
Not quite an issue, but, is HTML Canvas support planned?
Can we add support, and if so, what's the preferred Graphics API?
... and that being said, would the rasterization be done entirely
in minijoe, not using a parent API.
I'd imagine we'd want to use a parent API, as compiling to an API would
likely target native hardware on a device.
Original issue reported on code.google.com by [email protected]
on 31 Mar 2009 at 7:24
What steps will reproduce the problem?
1.
var times = [];
times[0] = 5;
times[1] = 8;
times[2] = 15;
print("times.length " + times.length) ;
> displays : "times.length 1"
What is the expected output? What do you see instead?
displays : "times.length 3"
What version of the product are you using? On what operating system?
Minijoe-1.0.zip, same behaviour with latest svn version.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 22 Jan 2010 at 3:57
What steps will reproduce the problem?
1. Open /javascript/canvasoids.html from Chrome
2. Go to developer tools/Java Script console
3. Open "Scripts" and error would show
What is the expected output? What do you see instead?
At line #63 variable "lives" is set to 0.
In lines 277,304,306,322,324 variable "lifes" is used instead.
What version of the product are you using? On what operating system?
SVN Revision 52, Windows XP
Please provide any additional information below.
Replacing all lifes->lives fixes the error.
Also, canvasoids.html has minor typing error in the <title> tag.
Original issue reported on code.google.com by [email protected]
on 30 Sep 2009 at 8:23
It is not a issues but should be an enhancement. Will minijoe plan to add
debug support?
Original issue reported on code.google.com by [email protected]
on 5 Aug 2009 at 7:19
Fixed Typo
Original issue reported on code.google.com by [email protected]
on 17 Jul 2013 at 4:00
Attachments:
After a lot of confusion as to why a JsObject.getInt returned 0 all the time I
discovered that toNumber() did not check whether the object was an integer,
which it was ( set by addVar("name", new Integer(intval)); )
Original issue reported on code.google.com by [email protected]
on 11 Mar 2014 at 9:02
Attachments:
The method date.toLocaleDateString returns the time portion of the date
instead of the date portion. The bug is in the prototype declaration in
JsDate.java. That method should reference ID_TO_LOCALE_DATE_STRING instead
of ID_TO_TIME_STRING. Also, date.toLocaleTimeString should probably
reference ID_TO_LOCALE_TIME_STRING instead of ID_TO_TIME_STRING.
Original issue reported on code.google.com by [email protected]
on 9 Jun 2009 at 4:01
What steps will reproduce the problem?
1.
Run my own javascript code that have a lot of functions calls on Nokia N79
device
What is the expected output? What do you see instead?
The application should work properly but the application crashed.
I think it's stack overflow that happens in JsFunction eval function.
What version of the product are you using? On what operating system?
Everything works fine in other device and OS. Just not N79 and E55
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 Nov 2009 at 4:41
String.split doesn't work. In JsObject, the STRING_PROTOTYPE does not
define the method name and parameter count.
In the actual implementation in evalNative, there's also a bug if the
caller doesn't not specify the "limit." In that case, an empty JsArray is
returned and instead it should split the whole string.
Original issue reported on code.google.com by [email protected]
on 29 Jul 2009 at 8:37
date.toDateString returns the time portion instead of the date portion. The
bug is in the prototype in JsDate.java. The "toDateString" method should
reference ID_TO_DATE_STRING and not ID_TO_TIME_STRING.
Original issue reported on code.google.com by [email protected]
on 9 Jun 2009 at 3:58
What steps will reproduce the problem?
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
var y = 10;
var x = 50;
function A() {
this.text = "Hello";
this.drawText = function() {
context.fillStyle='black';
context.translate(this.x+5,this.y+15);
context.mozTextStyle="9pt bold Verdana";
context.mozDrawText(this.text);
context.translate(-1 * (this.x+5),-1 * (this.y+15));
}
}
function B() {
}
B.prototype = new A();
b = new B();
b.drawText();
What is the expected output? What do you see instead?
Hello
What version of the product are you using? On what operating system?
Code from SVN
Please provide any additional information below.
Prototyping not working within script.
Original issue reported on code.google.com by [email protected]
on 6 Sep 2009 at 5:35
What steps will reproduce the problem?
1. class: com.google.minijoe.samples.runtime.Context2D
2. Method: static String[] split(String s, char c)
3. LineNmuber: 174
4. Version: r23
What is the expected output? What do you see instead?
input: split("0,0,0",',');
expected output: String[]{"0", "0", "0"};
actually output: String[]{"0",null,null};
What version of the product are you using? On what operating system?
minijoe:minijoe-1.0.zip
OS:windows-xp-sp3 + Java-6-u17
Please provide any additional information below.
the split() method maybe:
static String[] split(String s, char c) {
int count = 1;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == c) {
count++;
}
}
String[] parts = new String[count];
int lastCut = 0;
int n = 0;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == c) {
parts[n++] = s.substring(lastCut, i);
lastCut = i + 1;
}
}
parts[n] = s.substring(lastCut, s.length());
return parts;
}
Original issue reported on code.google.com by [email protected]
on 29 Jun 2010 at 2:59
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.