escoz/QuickDialog — Issue #86: QRadioElement Display Error
Author: ypf3027
Created: 2012-03-05 10:05:38+00:00
State: open

// This is my create form method
+ (QRootElement *)createForm
{
QRootElement *root = [[QRootElement alloc] init];
root.title = @"New User Regist";
root.controllerName = @"RegistController";
root.grouped = YES;

QSection *mainSection = [[QSection alloc] init];

QEntryElement *login = [[QEntryElement alloc] init];
login.title = @"email:";
login.key = @"email";
login.hiddenToolbar = YES;
login.placeholder = @"enter your personal email";
[mainSection addElement:login];

QEntryElement *password = [[QEntryElement alloc] init];
password.title = @"password:";
password.key = @"password";
password.secureTextEntry = YES;
password.hiddenToolbar = YES;
password.placeholder = @"enter your password here";
[mainSection addElement:password];

QRadioElement *carType = [[QRadioElement alloc] initWithItems:[NSArray arrayWithObjects:@"A", @"B", @"C", nil] selected:0 title:@"Type:"];
carType.key = @"carType";
//carType.controllerAction = @"";
[mainSection addElement:carType];

QSection *subSection = [[QSection alloc] init];
QButtonElement *button = [[QButtonElement alloc] init];
button.title = @"Do Regist";
button.controllerAction = @"onRegist:";
[subSection addElement:button];

[root addSection:mainSection];
[root addSection:subSection];

return root;
}

// I show the form use the method as below
- (IBAction)buttonClick:(id)sender
{
QRootElement *root = [RegistController createForm];
UINavigationController *navigation = [QuickDialogController controllerWithNavigationForRoot:root];
[self presentModalViewController:navigation animated:YES];
}

-------------------------------------------------------------------------------
when I run the app, but get an error display, give me a solution please!
My email is : ypf3027@163.com