The Gravey 2.0 Framework

Class GrvObject

Direct Known Subclasses:
MVCContext, EDOHolderSelectionItem, MVCDecode, MVCMutex, MVCEditRule, EDOIndex, MVCObserver, MVCMap, MVCView, EDO, MVCCommand

class GrvObject

This is the root class for all "classes" implemented via the GLOBALS.Class() function (ala Java "Object"). Class replaces the normal Javascript "constructor" function with a new wrapper function that implements a robust inheritence mechanism. This mechanism supports "pretty" source code whereby "methods" are declared inline, but the source code of those methods are not copied into every object instance as would otherwise be the case.

The wrapper function also sets up a real "constructor" that can use GLOBALS.grvValidateArgs() to insure that the required parameters are passed to it, throwing an exception if not.

The design pattern implemented by Class/Extends corrects several problems that occur with the naive inheritence mechanisms often used with Javascript.

  The required coding convention for "GrvObject":
  (1) the "class" is declared via the utility
      function GLOBALS.Class()
  (2) the "superclass" (if any) is declared via the
      .Extends method GLOBALS.grvExtends()
  (3) the "constructor" logic for the class is placed
      in a "method" named "konstructor"
  (4) the konstructor method invokes the "super" constructor
      via its class name [rather than literally "super()"]
  (5) "interfaces" and extra "superclasses" (if any) are
      declared via the .Implements method GLOBALS.grvImplements()

Version: 2.2

Author: Bruce Wallace (
See:Defined in grvClasses.js

Constructor Summary
GrvObject ()
Method Summary
 Object isInstanceOf( <Function> aClass )
           Is "this" a descendent of the given class?.
 Object souper()
           Invokes the "super" version of whatever method that is calling souper.
 Object souper_( superclass )
           Invokes the version of whatever method that is calling souper_ from the specified superclass.

Constructor Detail



Method Detail


Object isInstanceOf( <Function> aClass )


Object souper()


Object souper_( superclass )

The Gravey 2.0 Framework

Documentation generated by JSDoc on Sat Dec 8 21:51:44 2007