Subj : Re: ScriptableObject hierarchy To : netscape.public.mozilla.jseng From : Brian J. Sayatovic Date : Thu Jan 27 2005 08:07 pm Indeed! I'm using the workaround posted in the bug discussion and eagerly awaiting 1.6R2. Thanks! Regards, Brian. Igor Bukanov wrote: > See https://bugzilla.mozilla.org/show_bug.cgi?id=271401 foe > explanation and solution. > > Regards, Igor > > Trinition wrote: > >> I've got a base class which defines a getter: >> >> public class Base extends ScriptableObject { >> // ... >> public int jsGet_height() { >> return this.height; >> } >> //... >> } >> >> I then have a subclass: >> >> public class Subclass extends Base { >> // ... >> } >> >> Later, in my test driver, I set up the scope and context and call >> defineClass for my subclass only: >> >> this.context = Context.enter(); >> this.scope = context.initStandardObjects(); >> ScriptableObject.defineClass(scope, Subclass.class); >> >> Now when I run my test script, the 'height' property is undefined: >> >> var test = new Subclass(); >> var props = ""; >> props += "test.height:" + test.height + "\n"; >> props; >> >> The output of running this script is simply: >> >> test.height:undefined >> >> Is there anything extra I need to do to have defineCllass properly >> recognize the Java hierarchy and expose methods at the parent levels? >> Regards, >> Brian. >> > _______________________________________________ > mozilla-jseng mailing list > mozilla-jseng@mozilla.org > http://mail.mozilla.org/listinfo/mozilla-jseng > .