Files
cappuccino/Tests/Manual/CPRadioBindings/AppController.j
T
Aparajita Fishman a9952a28a4 CPRadioGroup enhancements
- You may now bind radio groups to selectedValue, selectedTag, selectedIndex, enabled, and hidden. enabled and hidden are multiple value bindings.
- Added some API to CPRadioGroup that parallels NSMatrix: selectRadioAtIndex:, selectRadioWithTag:
- Added setEnabled/setHidden, they operate on all of the radios in the group.
- Sample app to demonstrate all new features.
2013-02-23 00:01:19 -05:00

38 lines
820 B
Plaintext

/*
* AppController.j
* CPRadioBindings
*
* Created by You on February 22, 2013.
* Copyright 2013, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
@outlet CPWindow theWindow;
@outlet CPRadioGroup radios @accessors;
CPString title @accessors;
int index @accessors;
int tag @accessors;
BOOL enabled @accessors;
BOOL visible @accessors;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
[self setTitle:@"Two"];
[self setIndex:2];
[self setTag:13];
[self setEnabled:YES];
[self setVisible:YES];
}
- (@action)deselectAll:(id)sender
{
[radios selectRadioAtIndex:-1];
}
@end