Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pcs are junk

macrumors 65816
Original poster
Sep 28, 2009
1,046
0
Hi guys, this is my first real app that im developing for the iphone. i have everything all connected, except for these few errors. i would love to finish this app, to impress my father, because he would be very proud of me. so can somebody please help me out with this im not sure how to fix this. thanks in advance! Screen shot 2010-01-17 at 2.45.12 AM.png

here is the code after the signing stuff with my name and junk.


#import "UIWindow.h"

@implementation MainView

- (void)awakeFromNib {
[self addSubview:iPhoneTips];
}

- (IBAction)iPhone {Applications {
[iPhone Tips removeFromSuperview];
[self addSubview:iPhone Applications];
}

- (IBAction)Hacking {the iPhone {
[iPhone Applications removeFromSuperview];
[self addSubview:Hacking the iPhone];
}

- (IBAction)Secrets {of the iPhone {
[Hacking the iPhone removeFromSuperview];
[self addSubview:Secrets of the iPhone];
}

-(IBAction)Keeping {your iPhone Safe {
[Secrets of the iPhone removeFromSuperview];
[self addSubview:Keeping your iPhone Safe];
}

- (IBAction)Battery ;{Life {
[Keeping your iPhone Safe removeFromSuperview];
[self addSubview:Battery Life];
}

- (IBAction)Main {
[Battery Life removeFromSuperview];
[self addSubview:iPhone Tips];
}

@end
 

pcs are junk

macrumors 65816
Original poster
Sep 28, 2009
1,046
0
everything i do doesnt change anything, i still have the same amount of errors as before. its telling me "Expected ";" before "{" token" then its also saying "Applications undeclared". what does this mean? i have tried all the possible ways of putting ; before { and none of them work. can someone please correct my errors and post the correct code? thanks!
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
everything i do doesnt change anything, i still have the same amount of errors as before. its telling me "Expected ";" before "{" token" then its also saying "Applications undeclared". what does this mean? i have tried all the possible ways of putting ; before { and none of them work. can someone please correct my errors and post the correct code? thanks!

Look, what you posted isn't even close to valid Objective-C. I think you need to step back, read something on the language and actually learn what you are doing.

If Interface Builder created the file for you originally it's done it this way as you gave it invalid names for your actions. Once again because, I would suggest, you don't really know what you're doing and have not bothered to learn properly.
 

pcs are junk

macrumors 65816
Original poster
Sep 28, 2009
1,046
0
Look, what you posted isn't even close to valid Objective-C. I think you need to step back, read something on the language and actually learn what you are doing.

If Interface Builder created the file for you originally it's done it this way as you gave it invalid names for your actions. Once again because, I would suggest, you don't really know what you're doing and have not bothered to learn properly.

so...this means that since u cant fix it, then you dont know what you're doing and havnt bothered to learn properly. thanks for insulting yourself. :rolleyes:
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
so...this means that since u cant fix it, then you dont know what you're doing and havnt bothered to learn properly. thanks for insulting yourself. :rolleyes:

Wow, way to try and get help. I could easily turn that into valid Objective-C. If I did so you'd learn nothing and then come complaining to me that it didn't work as to fix it I'd rename the IBAction methods and that would break their connections in Interface Builder.

Due to your attitude I'm not going to make an further effort to point you in the correct direction. I hope you are more polite to people in real life.
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
Also, we do not like to just post fixed code as it does not aid you in learning anything. You problems are numerous. No variables should have spaces in them, you have curly braces and semi's in places they dont belong. As to the other person's suggestion to read up on the programming language and syntax. I second that.
 

KnightWRX

macrumors Pentium
Jan 28, 2009
15,046
4
Quebec, Canada
Let's just take 1 block to see the problems :

- (IBAction)iPhone {Applications {
[iPhone Tips removeFromSuperview];
[self addSubview:iPhone Applications];
}

There's 2 { in there for one }. You have inconsistent blocks. Start by properly opening/closing all your code blocks so that it is at least legible. That's what your unexpected token messages are about. Next is removing spaces in variable names. This block should look like this :

- (IBAction) iPhoneApplications {
[iPhoneTips removeFromSuperview];
[self addSubview:iPhoneApplications];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.