mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-30 20:07:36 +00:00
Normalize application naming in ./Tests/Manual
Ensure: * CamelCase, ending in Test * No hyphens, spaces, underscores or other non-alpha characters Updated application directory names. Update Jakefiles.
This commit is contained in:
1 parent
e3cb2cd6db
commit
4784a1a102
564 files changed
+686
-2258
No files matched your search
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* resignFirstResponder-CPControlTextDidEndEditing
|
||||
*
|
||||
* Created by aparajita on September 2, 2011.
|
||||
* Copyright 2011, Victory-Heart Productions All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
@outlet CPWindow theWindow;
|
||||
@outlet CPTextField field1;
|
||||
@outlet CPTextField field2;
|
||||
@outlet CPTextField status;
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
var center = [CPNotificationCenter defaultCenter];
|
||||
|
||||
[center addObserver:self selector:@selector(showNote:) name:CPControlTextDidBeginEditingNotification object:field1];
|
||||
[center addObserver:self selector:@selector(showNote:) name:CPControlTextDidEndEditingNotification object:field1];
|
||||
[center addObserver:self selector:@selector(showNote:) name:CPControlTextDidBeginEditingNotification object:field2];
|
||||
[center addObserver:self selector:@selector(showNote:) name:CPControlTextDidEndEditingNotification object:field2];
|
||||
|
||||
[status setStringValue:@""];
|
||||
}
|
||||
|
||||
- (void)showNote:(CPNotification)note
|
||||
{
|
||||
var fieldName = [note object] === field1 ? "field1" : "field2";
|
||||
[status setStringValue:[CPString stringWithFormat:@"%@\n%@", fieldName, [note name]]];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user