Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6989] Android: Methods with long[] return type don't get correctly converted in Kroll

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-02-10T00:01:31.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2012-01, Release 2.0.0, Release 1.8.1
ComponentsAndroid
Labelsn/a
ReporterHieu Pham
AssigneeHieu Pham
Created2012-01-04T16:15:42.000+0000
Updated2012-02-10T00:01:31.000+0000

Description

In Ti2DMatrix.java, if you add this method:
@Kroll.method
public long[] longValues(long val) 
{
	long[] result = new long[1];
	result[0] = val;
	return result;
}
then after re-scons, in a simple titanium app with the code:
var matrix1 = Ti.UI.create2DMatrix();
var s = matrix1.longValues(9);
Ti.API.debug("s is " + s[0] + " .. should be 9");
You will see that the actual return value is not 9, but some really big number

Comments

  1. Wilson Luu 2012-01-11

    Closing bug. Verified fix on: SDK build: 1.9.0(c58df0b) Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201101928 Device: Android Emulator 2.2
  2. Neeraj Gupta 2012-01-23

    Reopening and closing this issue to update label and Fix Version field.

JSON Source