Open main menu

Wikibooks β


< Objective-J
  • Objective-J has two types of objects, native JS objects and Objective-J objects.
    • Native JS objects are exactly what they sound like, the objects native to JavaScript.
    • Objective-J objects are a special type of native object added by Objective-J. These new objects are based on classes and traditional inheritance, like C++ or Java, instead of the prototype model.

Creating a classEdit

Here's an example of a Person class that contains one member variable, name:

@implementation Person : CPObject
       CPString name;