Created
July 11, 2009 20:02
-
-
Save chandlerkent/145374 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * AppController.j | |
| * NewApplication | |
| * | |
| * Created by You on July 5, 2009. | |
| * Copyright 2009, 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 view = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)]; | |
| [view setCenter:[contentView center]]; | |
| [view setBackgroundColor:[CPColor darkGrayColor]]; | |
| var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; | |
| [label setStringValue:@"Hello World!"]; | |
| [label setFont:[CPFont boldSystemFontOfSize:24.0]]; | |
| [label sizeToFit]; | |
| [label setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; | |
| [label setCenter:[view center]]; | |
| [view addSubview:label]; | |
| [contentView addSubview:view]; | |
| [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