/* * 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 label = [[CPTextField alloc] initWithFrame:CGRectMake(0,0,100,22)]; [label setBezeled: YES] [label setDrawsBackground: YES] [label setBezelStyle: CPTextFieldRoundedBezel] [label setEditable: YES] [label setDelegate: self] [contentView addSubview:label]; [theWindow orderFront:self]; } - (void) controlTextDidBeginEditing:(CPNotification)aNotification { console.log(">: " + [[aNotification object] stringValue]); } - (void) controlTextDidChange:(CPNotification)aNotification { console.log("-: " + [[aNotification object] stringValue]); } - (void) controlTextDidEndEditing:(CPNotification)aNotification { console.log("<: " + [[aNotification object] stringValue]); } @end