Subj : Re: ScriptableObject hierarchy To : Trinition From : Igor Bukanov Date : Thu Jan 27 2005 02:19 pm 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. > .