Hey guys;
I am currently following along with a teach-yourself book called "Sams Teach Yourself iPad Application Development." So far it has been going great, but now I've run into a problem. The gives two codes to type out then try to build (it's on pages 161-162) then create the interface with Interface Builder. Everything went good (I thought) but when I tried to 'point' from Files Owner to any of my text fields, in the Interface Builder, it wouldn't give me any outlet options. Confused, I tried to only 'build' the code that I had typed in Xcode, and I got two errors. I'm hoping that you guys will be able to help out:
The errors are:
They both 'appear' and the "@end" of the .m code
I have gone over it 100 times and I am positive I typed it in 100% like the book shows (I even wiped it all and started over, just to be sure) but it's not working.
Any/all help would be greatly appreciated. Thanks!
I am currently following along with a teach-yourself book called "Sams Teach Yourself iPad Application Development." So far it has been going great, but now I've run into a problem. The gives two codes to type out then try to build (it's on pages 161-162) then create the interface with Interface Builder. Everything went good (I thought) but when I tried to 'point' from Files Owner to any of my text fields, in the Interface Builder, it wouldn't give me any outlet options. Confused, I tried to only 'build' the code that I had typed in Xcode, and I got two errors. I'm hoping that you guys will be able to help out:
Code:
[B]FieldButtonFunViewController.h[/B]
//
// FieldButtonFunViewController.h
// FieldButtonFun
//
// Created by Julian Ontiveros on 12/5/10.
// Copyright 2010 SLCC. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface FieldButtonFunViewController : UIViewController {
IBOutlet UITextField *thePlace;
IBOutlet UITextField *theVerb;
IBOutlet UITextField *theNumber;
IBOutlet UITextView *theStory;
IBOutlet UITextView *theTemplate;
IBOutlet UIButton *generateStory;
}
@property (retain,nonatomic) UITextField *thePlace;
@property (retain,nonatomic) UITextField *theVerb;
@property (retain,nonatomic) UITextField *theNumber;
@property (retain,nonatomic) UITextView *theStory;
@property (retain,nonatomic) UITextView *theTemplate;
@property (retain,nonatomic) UIButton *generateStory;
-(IBAction)createStory:(id)sender;
@end
Code:
[B]FieldButtonFunViewController.m[/B]
//
// FieldButtonFunViewController.m
// FieldButtonFun
//
// Created by Julian Ontiveros on 12/5/10.
// Copyright 2010 SLCC. All rights reserved.
//
#import "FieldButtonFunViewController.h"
@implementation FieldButtonFunViewController
@synthesize thePlace;
@synthesize theVerb;
@synthesize theNumber;
@synthesize theStory;
@synthesize theTemplate;
@synthesize generateStory;
/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
*/
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
*/
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
The errors are:
andIncomplete implementation of class 'FieldButtonFunViewController'
Method Definition for '-createStory:' not found
They both 'appear' and the "@end" of the .m code
I have gone over it 100 times and I am positive I typed it in 100% like the book shows (I even wiped it all and started over, just to be sure) but it's not working.
Any/all help would be greatly appreciated. Thanks!