Subj : vector as return type in java function - access in jscript? To : netscape.public.mozilla.jseng From : Ulrich Staudinger Date : Tue Jan 27 2004 11:12 pm hi, ---------------------- jscript: 10: function initialize(){ 11: var v=dbl.getTenMinuteCandles(10); 12: var c= new Packages.Candle(); 13: xp.sendChatMessage("uls@jabber.org", "initialize."+c.getClose()); 14: var value=0.0; 15: for(i=0;i<10;i++){ 16: c=v.elementAt(i); 17: 18: 19: value+=c.getClose(); 20: } 21: xp.sendChatMessage("uls@jabber.org", "initialize."+value); 22: } ------------- i call the jscript function from a class evaluator. 'dbl' is known to the interpreter, as is xp. i can instantiate the new Packages.Candle(). Now, whenever i try to call c.getClose(), rhino responds with 'TypeError: undefined is not a function. (; line 19)' The vector should not be empty, i know that values are returned. the call in line 13 works. Do i have to cast to type Candle in line 16? Am i doing something wrong? with thanks, ulrich .