Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-16-2011, 11:57 AM   #1 (permalink)
Registered Member
 
georgescott's Avatar
 
Join Date: Jan 2011
Location: Califorina
Posts: 33
georgescott is on a distinguished road
Default what is going on

my at end is saying Expected declaration or statment at end input what dose that mean and my
Code:
 - (void)viewDidLoad{
is saying viewDidLoad undeclared and i don't know were i went wrong
Code:
#import "georgeissupersexyViewController.h"

@implementation georgeissupersexyViewController
@synthesize firstLabel;
@synthesize labelsText;

-(IBAction) clicked: (id)sender{
	NSString *titleofButton = [sender titleForState:UIControlStateNormal];
	NSString *newLabelText = [[NSString alloc] initWithFormat:@"%@", titleofButton];
	labelsText.text = newLabelText;
	[newLabelText release];



/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // 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{
	UIAlertView *alert = [[UIAlertView alloc] 
						  initWithTitle:@"Here's is a game."
						  message:@"find skocko"
						  delegate:nil
						  cancelButtonTitle:@"Click to go to game" 
						  otherButtonTitles:nil];
	
	[alert show];
	[alert release];	
    [super viewDidLoad]; 
}
	




// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

-(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];
}

-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
	firstLabel.text=@"find skocko";
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
	firstLabel.text=@"come one find him";
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
	firstLabel.text=@"ok just find him";
}
-(void)touchesMovedEnded:(NSSet *)touches withEvent:(UIEvent *)event{
	firstLabel.text=@"please find him";

	[super dealloc];
	[LabelsText relese];

}

	
@end
georgescott is offline   Reply With Quote
Old 02-16-2011, 12:01 PM   #2 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: Ypsilanti, Michigan
Age: 63
Posts: 1,549
RLScott is on a distinguished road
Default

You are missing a closing brace '}' at the end of your clicked method.
RLScott is offline   Reply With Quote
Old 02-16-2011, 12:01 PM   #3 (permalink)
Registered Member
 
simplyDusty's Avatar
 
Join Date: Jan 2011
Posts: 158
simplyDusty is on a distinguished road
Default

Is this what's in your header file?

-(void)viewDidLoad{

If so, the { needs to be a ;
simplyDusty is offline   Reply With Quote
Old 02-16-2011, 12:03 PM   #4 (permalink)
Registered Member
 
georgescott's Avatar
 
Join Date: Jan 2011
Location: Califorina
Posts: 33
georgescott is on a distinguished road
Default

thank you it is working now
georgescott is offline   Reply With Quote
Old 02-16-2011, 12:04 PM   #5 (permalink)
Registered Member
 
simplyDusty's Avatar
 
Join Date: Jan 2011
Posts: 158
simplyDusty is on a distinguished road
Default

Quote:
Originally Posted by RLScott View Post
You are missing a closing brace '}' at the end of your clicked method.
^ that. I was a bit confused by the first code box the OP added
simplyDusty is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 368
8 members and 360 guests
cpsclicker, Error404, jeroenkeij, Kirkout, PavelMik, teebee74, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,666
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, cpsclicker
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:06 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0