Demonstration of the basic GrvObject Platform with Multiple Inheritance

Using the minimal grvObjects.js implementation

[should alert "Howdy"]
[should alert "Howdy"]
[should alert "Howdy" then "Y'all"]
[should alert "Bye"]
[should alert "Aloha"]
[should alert "Aloha"]
[should alert "foo"]
[should alert "D says x" then "x"]

Initial contents of objects [as output by dumpObjects()]...

put dump here

The source code...
Class(A);
function A(){
  this.konstructor = function(p1){ this.a = p1; }
  this.say         = function(what){ alert(what); }
  this.sayHi       = function(){ this.say("Howdy!"); }
  this.sayBye      = function(){ this.say("Bye!"); }
  this.dumpvars    = function(){ return " a="+this.a; }
  this.dump        = function(){ return "["+this.dumpvars()+" ]"; }
}

Class(B).Extends(A);
function B(){
  this.konstructor = function(p1,p2){ this.souper(p1); this.b = p2; }
  this.dumpvars    = function(){ return this.souper()+" b="+this.b; }
  this.sayBye      = function(){ this.say("Aloha!"); }
}

Class(C).Extends(B);
function C(){
  this.konstructor = function(p1,p2,p3){ this.souper(p1,p2); this.c = p3; }
  this.dumpvars    = function(){ return this.souper()+" c="+this.c; }
  this.sayHi       = function(){ this.souper(); this.say("Y'all"); }
}

Class(D);
function D(){
  this.konstructor = function(p1){ this.d = p1; }
  this.dumpvars    = function(){ return " d="+this.d; }
  this.say         = function(what){ alert("D says:"+what); }
}

Class(E).Extends(D);
function E(){
  this.konstructor = function(p1,p2){ this.souper(p1); this.e = p2; }
  this.dumpvars    = function(){ return this.souper()+" e="+this.e; }
}

Class(F);
function F(){
  this.sayFoo      = function(){ alert("foo"); }
}

Class(X).Extends(C).Implements(E);
function X(){
  this.konstructor = function(p1,p2,p3,p4,p5){ this.E(p1,p2); this.C(p3,p4,p5); }
  this.dumpvars    = function(){ return this.souper_(C) + this.souper_(E); }
}

Class(Y).Extends(E).Implements(C);
function Y(){
  this.konstructor = function(p1,p2,p3){ this.souper(p1,p2,p3); }
}

Class(Z).Extends(C).Implements(E,F);
function Z(){
  this.konstructor = function(p1,p2,p3){ this.souper(p1,p2,p3); }
  this.say         = function(what){ this.souper_(E,what); this.souper_(C,what); }
}

Class(NotUsed);
function NotUsed(){ this.sayFool = function(){ alert("fool"); } }

var gA = new A(1);
var gB = new B(2,3);
var gC = new C(4,5,6);
var gY = new Y(7,8,9);
var gX = new X(10,11,12,13,14);
var gZ = new Z(15,16,17);

function listInstanceOf( anObject ){
	return "["
        + (anObject.isInstanceOf(A) ? "A" : " ")
        + (anObject.isInstanceOf(B) ? "B" : " ")
        + (anObject.isInstanceOf(C) ? "C" : " ")
        + (anObject.isInstanceOf(D) ? "D" : " ")
        + (anObject.isInstanceOf(E) ? "E" : " ")
        + (anObject.isInstanceOf(X) ? "X" : " ")
        + (anObject.isInstanceOf(Y) ? "Y" : " ")
        + (anObject.isInstanceOf(Z) ? "Z" : " ")
        + (anObject.isInstanceOf(NotUsed)     ? "Err1" : "")
        + (anObject.isInstanceOf(dumpObjects) ? "Err2" : "")
        + "]";
}
function dumpObjects(){
  var s = "gA:"+listInstanceOf(gA)+ gA.dump() + "[br/]"
        + "gB:"+listInstanceOf(gB)+ gB.dump() + "[br/]"
        + "gC:"+listInstanceOf(gC)+ gC.dump() + "[br/]"
        + "gX:"+listInstanceOf(gX)+ gX.dump() + "[br/]"
        + "gY:"+listInstanceOf(gY)+ gY.dump() + "[br/]"
        + "gZ:"+listInstanceOf(gZ)+ gZ.dump() + "[br/]";

  document.getElementById("OutputArea").innerHTML = s;
}