Created
March 18, 2009 14:11
-
-
Save chandlerkent/81139 to your computer and use it in GitHub Desktop.
This file contains 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
@import <Foundation/CPObject.j> | |
@implementation AppController : CPObject | |
{ | |
} | |
- (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
{ | |
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], | |
contentView = [theWindow contentView]; | |
var secureTextField = [[CPSecureTextField alloc] initWithFrame:CGRectMakeZero()]; | |
[secureTextField setEditable:YES]; | |
[secureTextField setStringValue:@"Hello World"]; | |
[secureTextField setFont:[CPFont boldSystemFontOfSize:24.0]]; | |
[secureTextField sizeToFit]; | |
[secureTextField setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; | |
[secureTextField setFrameOrigin:CGPointMake((CGRectGetWidth([contentView bounds]) - CGRectGetWidth([secureTextField frame])) / 2.0, (CGRectGetHeight([contentView bounds]) - CGRectGetHeight([secureTextField frame])) / 2.0)]; | |
[contentView addSubview:secureTextField]; | |
[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