-
-
Save chandlerkent/81140 to your computer and use it in GitHub Desktop.
test description
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
test file 2 |
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()]; | |
// The offending call. When you move out of the text field, an error is thrown. | |
[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