Skip to content

Instantly share code, notes, and snippets.

@angerman
Created March 11, 2009 06:35
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 angerman/77347 to your computer and use it in GitHub Desktop.
Save angerman/77347 to your computer and use it in GitHub Desktop.
/* -*- coding: utf-8 -*-
* Created by Moritz Angermann on 6. March 2009.
* Copyright 2009 Moritz Angermann. 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 x = [[CPTextField alloc] initWithFrame:CGRectMake(10,10,0,0)],
y = [[CPTextField alloc] initWithFrame:CGRectMake(10,40,0,0)],
z = [[CPTextField alloc] initWithFrame:CGRectMake(10,70,0,0)];
[x setStringValue:@"1: _____"];
[y setStringValue:@"2: _____"];
[z setStringValue:@"3: _____"];
[x setEditable:YES]; [y setEditable:YES]; [z setEditable:YES];
[x sizeToFit]; [y sizeToFit]; [z sizeToFit];
[contentView addSubview:x];
[contentView addSubview:y];
[contentView addSubview:z];
[theWindow orderFront:self];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment