Files
cappuccino/Tests/Manual/KeyViewLoopTest/AppController.j
T
Aparajita Fishman cdc88dbe18 Key view...
- Factored out blur handler from CPTokenField into CPTextField.
- CPTextField will no longer lose focus unnecessarily.
- Changed switch style in CPWindow -sendEvent.
- Added menu bar to KeyViewLoop test app.
2013-01-11 00:18:38 +07:00

43 lines
729 B
Plaintext

/*
* AppController.j
* KeyViewLoopTest
*
* Created by You on January 7, 2013.
* Copyright 2013, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
@outlet CPWindow keyWindow;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
[keyWindow makeKeyAndOrderFront:self];
}
@end
@implementation MyWindow : CPWindow
- (@action)addField:(id)sender
{
var field = [CPTextField textFieldWithStringValue:@"" placeholder:@"" width:96];
[field setFrameOrigin:CGPointMake(20, 120)];
[[self contentView] addSubview:field];
[sender setEnabled:NO];
}
- (@action)recalc:(id)sender
{
[self recalculateKeyViewLoop];
}
@end