Skip to content

Instantly share code, notes, and snippets.

@chandlerkent
Created July 7, 2011 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chandlerkent/1068824 to your computer and use it in GitHub Desktop.
Save chandlerkent/1068824 to your computer and use it in GitHub Desktop.
/*
* AppController.j
* NewApplication
*
* Created by You on February 22, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
[label setStringValue:@"From GitHub"];
[label setFont:[CPFont boldSystemFontOfSize:24.0]];
[label sizeToFit];
[label setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin];
[label setCenter:[contentView center]];
[contentView addSubview:label];
[theWindow orderFront:self];
// Uncomment the following line to turn on the standard menu bar.
//[CPMenu setMenuBarVisible:YES];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment