Subj : Re: limitation of Rhino evaluator To : =?ISO-8859-2?Q?Krokovay_K=E1roly?= From : Igor Bukanov Date : Fri Nov 05 2004 11:29 am Krokovay Károly wrote: > Igor, > I tried it and the evaluatin was successfull, but when I called a > function I got a null exception. > My source: > > Object fRunStrat = scope.get(function_name, scope); > if ((fRunStrat instanceof Function && fRunStrat !=null )) { > Function fRS = (Function)fRunStrat; > Object resultRS = fRS.call(cx, scope, scope, null); ^^^^^^^^^^^^^ > } You should NOT pass null as arguments array. Use either new Object[0] or as alternative since Rhino 1.5R5 Context.emptyArgs Also "if ((fRunStrat instanceof Function && fRunStrat !=null ))" is equivalent to "if ( fRunStrat instanceof Function )" since "instanceof" gives false for null argument. Regards, Igor .