Nico Krebs
unread,Jul 26, 2012, 1:49:45 PM7/26/12You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hey Igor,
i'm having trouble with the following:
if have two JAVA classes A and B while B extends A and overloads a method of A:
class A{a(){return "a"}}
class B extends A{ a(){return "B"}}
now i'd like to be able to execute "a()" in javaScript on Rhino.
usually, on non-overloaded java methods i would do the following when initializing the rhino engine:
scope.defineFunctionProperties("a", new B().getClass(), ScriptableObject.DONTENUM);
but when i'm doing this, i get the following exception:
Method "a" occurs multiple times in class "B".
i also tried to use a different name in class B and i got this exception:
TypeError: Method "a" called on incompatible object.
I would be really happy about any suggestions :)
greetz,
nico