/* * AppController.j * * Created by __Me__ on __Date__. * Copyright 2008 __MyCompanyName__. All rights reserved. */ @import @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