Created
March 30, 2012 19:57
-
-
Save yllan/2254473 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
| @import <Foundation/CPObject.j> | |
| @implementation AppController : CPObject | |
| { | |
| } | |
| - (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
| { | |
| var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask]; | |
| var label = [[CPTextField alloc] initWithFrame:CGRectMake(100.0, 100.0, 150.0, 29.0)]; | |
| [label setStringValue:@"Hello World!"]; | |
| [label setEditable:YES]; | |
| [label setBezeled:YES]; | |
| [label setBordered:YES]; | |
| [[theWindow contentView] addSubview:label]; | |
| var panel = [[CPPanel alloc] initWithContentRect:CGRectMake(200.0, 200.0, 300.0, 300.0) styleMask:nil], | |
| label2 = [[CPTextField alloc] initWithFrame:CGRectMake(100.0, 100.0, 150.0, 29.0)]; | |
| [label2 setPlaceholderString:@"Text Field"]; | |
| [label2 setEditable:YES]; | |
| [label2 setBezeled:YES]; | |
| [label2 setBordered:YES]; | |
| [[panel contentView] addSubview:label2]; | |
| [panel setInitialFirstResponder:label2]; | |
| [theWindow orderFront:self]; | |
| [panel orderFront:self]; | |
| [panel makeFirstResponder:label2]; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment