From 6e15ce0c001678362be769eca633eef3b931b37c Mon Sep 17 00:00:00 2001 From: Glenn Rempe Date: Wed, 12 Nov 2008 19:24:04 -0800 Subject: [PATCH] Some updates to NewApplication. [#137 state:resolved] Reviewed by me. --- Tools/NewApplication/AppController.j | 24 +++++++++++++++--------- Tools/NewApplication/main.j | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Tools/NewApplication/AppController.j b/Tools/NewApplication/AppController.j index d8c7915115..dd8129e8b5 100644 --- a/Tools/NewApplication/AppController.j +++ b/Tools/NewApplication/AppController.j @@ -1,5 +1,11 @@ +/* + * AppController.j + * + * Created by __Me__ on __Date__. + * Copyright 2008 __MyCompanyName__. All rights reserved. + */ -import +@import @implementation AppController : CPObject @@ -10,23 +16,23 @@ import { var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], contentView = [theWindow contentView]; - + 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 setFrameOrigin:CGPointMake((CGRectGetWidth([contentView bounds]) - CGRectGetWidth([label frame])) / 2.0, (CGRectGetHeight([contentView bounds]) - CGRectGetHeight([label frame])) / 2.0)]; - + [contentView addSubview:label]; - + [theWindow orderFront:self]; - + // Uncomment the following line to turn on the standard menu bar. //[CPMenu setMenuBarVisible:YES]; } -@end \ No newline at end of file +@end diff --git a/Tools/NewApplication/main.j b/Tools/NewApplication/main.j index 6357f21dc8..b82bd4e3c4 100755 --- a/Tools/NewApplication/main.j +++ b/Tools/NewApplication/main.j @@ -1,15 +1,15 @@ -// -// main.j -// PhotoAlbum -// -// Created by Francisco Tolmasky on July 18th, 2008. -// Copyright 2005 - 2008, 280 North, Inc. All rights reserved. -// +/* + * main.j + * + * Created by __Me__ on __Date__. + * Copyright 2008 __MyCompanyName__. All rights reserved. + */ -import -import +@import +@import + +@import "AppController.j" -import "AppController.j" function main(args, namedArgs) {