--------------------
public Object func() throws Exception {
return Long.valueOf("123");
}
--------------------
i have reduced the complexity of it right down, so you can see.
When i access this in my Javascript:
-----------
x = $cf.func();
y = x + 1;
-----------
x = 123 and y = 1231. If i multiple x by *1 then its fine. but thats
a kludge.
How can i get Rhino to respect the fact i am returning a
java.lang.Number for it to keep it as that, and not convert it to a
string object?
thanks
Short explanation is that if you don't, your java.lang.Long will be
seen as a JS Object, not as a JS number primitive, and Objects will be
concatenated with other values as strings...
Attila.
So to play the other team -- under what circumstances would i want to
leave it as is?