Implementing the method from the superclass in the childclass and then let it just call the superclass method makes the use of inheritance quite useless in my eyes. I can't imagine, that this is the only way to do that? As far as I know, with normal JavaScript, calling the superclass method is no problem at all, so why doesn't this work on qooxdoo? That seems like a step backwards...?!
Best regards, Michael Am 29.07.2009 um 08:32 schrieb skar: > Michael Ochs wrote: >> Hi, >> >> I have a super class and its child class. In the child class I call: >> >> this >> ._addCommunicationIDToDropList(this.__lastCommunicationIDForArea); >> >> where _addCommunicationIDToDropList(id) is a function of the >> superclass. >> >> This fails with the error "TypeError: >> this._addCommunicationIDToDropList is not a function" >> >> What am I doing wrong? Do I have to call non-overwritten methods with >> another context than this? >> > Maybe you need to have this method in the child class also and then > inside that child class method, call the superclass method like this > http://qooxdoo.org/documentation/0.8/oo_feature_summary?s=singleton#calling_the_overridden_superclass_method > > : > >> qx.Class.define("my.cool.Class", >> { >> extend : my.great.SuperClass, >> ... >> members : { >> foo : function(x) { >> this.base(arguments, x); >> } >> } >> }); > Of course, I'm not sure if this technique is really needed and also > whether you can or cannot call superclass methods on an instance of > child class. My C++, Java skills tell that this should be possible, > but > qooxdoo might do it differently. > > cheers, > skar. > > -- > -- > The life so short, the craft so long to learn. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel