You are currently viewing the BOOK: Beginning iPhone SDK Programming with Objective-C section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
- (IBAction)btnClicked:(id)sender {
NSString *str = [[NSString alloc]
initWithFormat:@"Hello, %@", nameTextField.text ];
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Hello"
message: str
delegate:self
cancelButtonTitle:@"OK" //is correct - the word Title is capitalized
otherButtonTitles:nil, nil];
[alert show];
[alert release];
[str release];
}
All method names have the argument names in camelCase. If you manually type in the methods watch for this. Whenever possible let autofill do its thing.
From your supplied code I don't see the issue with the @property. If you have not yet resolved it an you still need help send the project to iPadHelper@me.com
It is possible the error is caused somewhere else, so having the complete project will make it easier to track down.
Bob
The Following User Says Thank You to thepianoguy For This Useful Post: