Subj : Re: vector as return type in java function - access in jscript? To : netscape.public.mozilla.jseng From : Ulrich Staudinger Date : Wed Jan 28 2004 10:53 am Igor. > > The output is fine assuming that Candle.toString() in Java returns > empty string. Could you add then this output after line 12 and add in > addition before each call of Candle.toString() returns not an empty string ... it returns the content of the candle (which is date, hi value, low, open and close) as a string. > c.getClose(): > java.lang.System.out.println("function: "+c.getClose); > and > java.lang.System.out.println("property: "+c.close); > ------------------- New script: function initialize(){ var v=dbl.getTenMinuteCandles(10); var c= new Packages.Candle(); java.lang.System.out.println(c + " "+typeof c+" "+c.getClass()); java.lang.System.out.println("function1: "+c.getClose); 13: java.lang.System.out.println("property1: "+c.close); 14: xp.sendChatMessage("uls@jabber.org", "initialize."+c.getClose()); 15: var value=0.0; java.lang.System.out.println("Size: "+v.size()); for(i=0;i<1;i++){ c=v.elementAt(i); java.lang.System.out.println(c + " "+typeof c+" "+c.getClass()); java.lang.System.out.println("function: "+c.getClose); java.lang.System.out.println("property: "+c.close); value+=c.getClose(); } xp.sendChatMessage("uls@jabber.org", "initialize."+value); } ------------------ object class Candle function1: undefined property1: undefined Evaluator(): TypeError: undefined is not a function. (<cmd>; line 14) ? regards, ulrich .