On Mar 4, 10:26 pm, [EMAIL PROTECTED] wrote:
> Dear !
> There are some functions  whose parameter number is not predetermined
> in browser? How can I implement these function in Rhino?
>
> Besides, how can I define a static function?
>  In counter,  I add the following codes to it ,
>     public static void jsStaticFunction_Open(Context context,
> Scriptable scriptable, Object args[], Function function)
>             {
>                   for(int i = 0;i<args.length;i++)
>                           System.out.println(args[i]);
>                 }
>
> I try to visit it as  counter.Open("1","2"),   there are some error
> messages " can't find the Open function"  !
>
> Thank you!
> BinLi!

Have you tried writing your classes in Java and exposing to
JavaScript? It's a much simpler way to proceed and there are only a
few pieces of JavaScript functionality that don't have a Java
equivalent (like dynamic properties).

--N
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to