Objective-C code problem?
Hi guys, im brand new to the Objective-C code and thats why I bought a book, "head first iPhone Development", and I have Xcode3.
problem-
I'v run into a few problems with the code from the book on my compiler. i just started out on my book and have already got a problem 😟
iDecideViewController.h
#import <UIKit/UIKit.h>
@interface iDecideViewController : UIViewController {
IBOutlet UILable *decisionText;
}
@property (retain, nonatomic) UILable *decisonText;
-(IBAction)buttonPressed:(id)sender;
@end
expected specifier-qualifier-list before 'UILable'
im getting this error on line 5
IBOutlet UILable *decisionText;
and on line 7
@property (retain, nonatomic) UILable *decisonText;
and another problem on this file & code
iDecideViewController.m
#import "iDecideViewController.h"
@implementation iDecideViewController
@synthesize decisionText;
-(IBAction)buttonPressed: (id)sender
{
decisionText.text = @"Go for it!";
}
no declaration of property 'decisionText' found in the interface
this error on line 4
@synthesize decisionText;
'decisionText' undeclared (first use in this function)
this code on line 8
decisionText.text = @"Go for it!";
- (void)dealloc {
[decisionTextrelease];
[super dealloc];
}
'decisionText' undeclared (first use in this function)
this error on line 3
[decisionTextrelease];
========================================
So after all that my question is, is my code wrong/outdated or what? im typing right from the book.
and could anyone redirect me to a Objective-C book or what-have-you?
Mac OS X (10.6.8)