0

Multiple inheritance with KONtx?

Hi everyone,

From what I know about the framework, there is *no* built-in way to do multiple inheritance (correct me if I am wrong). I know it is technically possible. Could please give me some suggestion on how to do this with KONtx?

Many thanks in advance!

Tinh

by
1 Reply
  • QUOTE (911 @ Apr 27 2011, 07:56 AM) <{POST_SNAPBACK}>
    Hi everyone,

    From what I know about the framework, there is *no* built-in way to do multiple inheritance (correct me if I am wrong). I know it is technically possible. Could please give me some suggestion on how to do this with KONtx?

    Many thanks in advance!

    Tinh

    You can't list multiple classes using the "Extends" property. I believe you can achieve something similar using the "Implements" property, which accepts an array of classes.

    I've personally always been confused at the terminology of "Extends" vs "Implements" as used in the Yahoo framework.

    From my understanding (and Yahoo engineers, slap me if I'm wrong), extends technically sets the prototype of the Class to what you specify. The "Implements" property adds methods, or mixes-in, additional methods into the prototype.

    Implements to me is more like an approach called a mixin (or Traits in Scala) where you are not just implementing an interface, like say in Java, but you are also mixing in an implementation. In this way, you can still separate functionality in multiple different mixin classes, and simulate what multiple inheritance could provide.

    ...But again, I could be pulling this all out of you know where, so take in with a grain of salt until a Yahoo engineer responds.
    0

Recent Posts

in General - Yahoo! TV Widgets