I was experimenting a bit and wondered into Amber's Javascript land. Calling 'self something' executes the method on anObject if it doesn't find it there method lookup goes up the inheritance chain to the superclass and the super of the superclass.
Where does this super happen in Amber? Could one mess with it? -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Try to compile a super call and look what JS it produces and learn the rest from it.
Or did I again not understood what the question is about? Herby Mircea Samoilă wrote: > I was experimenting a bit and wondered into Amber's Javascript land. Calling 'self something' executes the method on anObject if it doesn't find it there method lookup goes up the inheritance chain to the superclass and the super of the superclass. > > Where does this super happen in Amber? > Could one mess with it? > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
You got it! Your advice sheds some light on the problem: //>>excludeStart("ctx", pragmas.excludeDebugContexts); $ctx1.supercall = true, //>>excludeEnd("ctx"); $globals.WhateverClass.superclass.fn.prototype._initialize.apply($recv(self), [])); //>>excludeStart("ctx", pragmas.excludeDebugContexts); $ctx1.supercall = false; //>>excludeEnd("ctx");; I'll dig deeper.
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Herby Vojčík
You got it! Your advice sheds some light on the problem: //>>excludeStart("ctx", pragmas.excludeDebugContexts); $ctx1.supercall = true, //>>excludeEnd("ctx"); $globals.WhateverClass.superclass.fn.prototype._initialize.apply($recv(self), [])); //>>excludeStart("ctx", pragmas.excludeDebugContexts); $ctx1.supercall = false; //>>excludeEnd("ctx");; I'll dig deeper.
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |