Skip to content
kerrishotts edited this page Apr 1, 2013 · 1 revision

(part of PKObject)

Return Type: void

Parameters: newClass (string)

Subclasses an object with the name of the supplied class. The new class name is added to _classHierarchy and the prior class becomes the superclass.

A subclass inherits all the original methods as-is -- if a method is to be subclassed, use overrideSuper and super.

Usage

newObject = function ()
{
    var self = new PKObject();
    self.subclass ( "newObject" );
    ...
    return self;
}

Version

0.3 Introduced; docs valid

Clone this wiki locally