Objective-J is an actively used programming language created in 2008. Objective-J is a programming language developed as part of the Cappuccino web development framework. Its syntax is nearly identical to the Objective-C syntax and it shares with JavaScript the same relationship that Objective-C has with the C programming language: that of being a strict, but small, superset; adding traditional inheritance and Smalltalk/Objective-C style dynamic dispatch. Pure JavaScript, being a prototype-based language, already has a notion of object orientation and inheritance, but Objective-J adds the use of class-based programming to JavaScript. Read more on Wikipedia...

12Years Old 25Users ?Jobs

Example code from Linguist:

@import <Foundation/CPObject.j>

@implementation AppController : CPObject

- (void)applicationDidFinishLaunching:(CPNotification)aNotification
    // The end result of this layout will be the kind of master/detail/auxilliary view
    // found in iTunes, Mail, and many other apps.

    var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
        contentView = [theWindow contentView];

    var navigationArea = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 150.0, CGRectGetHeight([contentView bounds]) - 150.0)];

    [navigationArea setBackgroundColor:[CPColor redColor]];

    // This view will grow in height, but stay fixed width attached to the left side of the screen.
    [navigationArea setAutoresizingMask:CPViewHeightSizable | CPViewMaxXMargin];

    [contentView addSubview:navigationArea];

    var metaDataArea = [[CPView alloc] initWithFrame:CGRectMake(0.0, CGRectGetMaxY([navigationArea frame]), 150.0, 150.0)];

    [metaDataArea setBackgroundColor:[CPColor greenColor]];

    // This view will stay the same size in both directions, and fixed to the lower left corner.
    [metaDataArea setAutoresizingMask:CPViewMinYMargin | CPViewMaxXMargin];

    [contentView addSubview:metaDataArea];

    var contentArea = [[CPView alloc] initWithFrame:CGRectMake(150.0, 0.0, CGRectGetWidth([contentView bounds]) - 150.0, CGRectGetHeight([contentView bounds]))];

    [contentArea setBackgroundColor:[CPColor blueColor]];

    // This view will grow in both height an width.
    [contentArea setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];

    [contentView addSubview:contentArea];

    [theWindow orderFront:self];


Example code from Wikipedia:

@implementation Address : CPObject
  CPString name;
  CPString city;

- (id)initWithName:(CPString)aName city:(CPString)aCity
  self = [super init];

  name = aName;
  city = aCity;

  return self;

- (void)setName:(CPString)aName
  name = aName;

- (CPString)name
  return name;

+ (id)newAddressWithName:(CPString)aName city:(CPString)aCity
  return [[self alloc] initWithName:aName city:aCity];


Trending Repos

repo stars description

Last updated August 9th, 2020

Edit Objective-J on GitHub