From: cindy <inf...@pi...> - 2001-04-05 14:22:38
|
Thanks Samuele, I tried your example and study it and it works and I beleave I understand what it does. I guess I'm not making myself clear. I just want to find away of not having to inherit Component to use enableEvents() method. Its obvious that I'm making some people upset. So I'll it let go. Thanks all for being patient. Wayne Samuele Pedroni wrote: > Here's a clarifying example (I hope): > > <A.java> > public class A { > > protected void prot1() { > System.out.println("java prot1"); > > } > > protected void prot2() { > System.out.println("java prot2"); > } > > public static void invoke_prot2(A a) { > a.prot2(); > } > > } > </A.java> > > <ex.py> > > import A > > class Apy(A): > def invoke_prot1(self): > self.prot1() > # note: self.super__prot1() won't work because prot1 is not overriden > > def invoke_super_prot2(self): > self.super__prot2() > > def prot2(self): > print "Apy prot2" > > print "-- Apy --" > print dir(Apy) # notice that there's no super__prot1 > > a=Apy() > a.invoke_prot1() > a.invoke_super_prot2() > a.prot2() > A.invoke_prot2(a) > > </ex.py> > > You can just try it. > > regards. > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |