Prev: How to link CSS(s) already linked to parent frame into child iframe using javascript
Next: Error getElementbyClassName
From: Dmitry A. Soshnikov on 13 Jan 2010 08:52 On Jan 13, 4:36 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de> wrote: > Dmitry A. Soshnikov wrote: > > Thomas 'PointedEars' Lahn wrote: > >> /* JScript .NET has `super' to refer to the superclass */ > >> super.foo(); > > > By the way, there's also one more ability to call overwritten parent > > method just with `this._super()' expression. > > Tell me something I don't know yet Hope, that it isn't a Megalomanina ;) I was talking about exactly user-defined inheritance system with using `this._super()' for that. Not regarding to JScript.NET. > (check out Function.prototype.extend() in > object.js). Regardless, the *user-defined* `_super' property would be a > reference to the constructor or prototype object (here: the prototype > object), explicitly "prohibited" per Jorge's claim. Pay more attention.. > I know that pattern (moreover, it's most widespread pattern of many libraries), but I meant other (alternative) ways. Which are more "dangerous" (such as with `caller') or less efficient by performance (such as with wrappers), but useful from the using viewpoint. /ds
From: Jorge on 13 Jan 2010 08:59 On Jan 13, 2:25 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de> wrote: > Jorge wrote: > > Thomas 'PointedEars' Lahn wrote: > >> (...) > >> Anyhow, now try that in a prototype method -- it will not work, because > >> `this' refers to the calling object, not its prototype. And if you are > >> still not convinced that this approach is not a general good solution, > >> pray call the foo() method of the second-next object in the prototype > >> chain now (again, without referring to prototype objects or constructors, > >> per your claim.) > > > Sorry, as for today, I've run out of tricks. > > You're such a coward, Jorge. Why don't you simply admit that you can't do > it without referring to a prototype object or constructor because it can't > be done? I'm not, Pointy: listen: I admit it can't be done (but note that I never said it could), at least not in any way that is known to me. You'd -probably- need a good trick to achieve that. And I've run out of tricks :-) Have you got any ? -- Jorge.
From: Jorge on 13 Jan 2010 09:03 On Jan 13, 2:30 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de> wrote: > (...) > ACK. I am surprised why Jorge of all people would go at lengths to prove > Crockford wrong :) Wait, I have *not* put any words in Crockford's mouth. In that video, somebody in the public asked him if deleting an own property would allow an inherited one show through the "hole". Obviously he answered yes. That's all. -- Jorge.
From: Thomas 'PointedEars' Lahn on 13 Jan 2010 09:03 Dmitry A. Soshnikov wrote: > Thomas 'PointedEars' Lahn wrote: >> Dmitry A. Soshnikov wrote: >> > Thomas 'PointedEars' Lahn wrote: >> >> /* JScript .NET has `super' to refer to the superclass */ >> >> super.foo(); >> > By the way, there's also one more ability to call overwritten parent >> > method just with `this._super()' expression. >> Tell me something I don't know yet > > Hope, that it isn't a Megalomanina ;) Mirror, mirror ... > I was talking about exactly user-defined inheritance system with using > `this._super()' for that. Tell me something I don't know yet. `this._super' can only ever refer to a) the constructor associated with the next object in the prototype object (added to Function objects on which extend() is called in object.js) b) the prototype object itself, which usually is _not_ callable (added to prototype objects on which associated constructors extend() is called in object.js) It can *never* generally refer to the corresponding overloaded method because that method is not the same in all overloading methods. > Not regarding to JScript.NET. I was not referring to JScript .NET. object.js uses prototype-based inheritance and is written for such implementations. >> (check out Function.prototype.extend() in >> object.js). Regardless, the *user-defined* `_super' property would be a >> reference to the constructor or prototype object (here: the prototype >> object), explicitly "prohibited" per Jorge's claim. Pay more attention. > > I know that pattern (moreover, it's most widespread pattern of many > libraries), Such as? > but I meant other (alternative) ways. Which are more > "dangerous" (such as with `caller') or less efficient by performance > (such as with wrappers), but useful from the using viewpoint. What the heck are you talking about? PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann
From: David Mark on 13 Jan 2010 09:13
Jorge wrote: > On Jan 13, 2:30 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de> > wrote: >> (...) >> ACK. I am surprised why Jorge of all people would go at lengths to prove >> Crockford wrong :) > > Wait, I have *not* put any words in Crockford's mouth. In that video, > somebody in the public asked him if deleting an own property would > allow an inherited one show through the "hole". Obviously he answered > yes. That's all. You wasted all of that time over an irrelevant aside like that? You have a real problem Jorge. |