Twitist Forums
URGENT: Whats wrong with this code? (objective-c)? - Printable Version

+- Twitist Forums (http://twitist.com)
+-- Forum: Twitter forums (/forum-1.html)
+--- Forum: Twitter General help (/forum-6.html)
+--- Thread: URGENT: Whats wrong with this code? (objective-c)? (/thread-3453.html)



URGENT: Whats wrong with this code? (objective-c)? - burhan - 10-02-2012 01:52 PM

-(void)otherGames
{
UIAlertView *alertMsg = [[UIAlertView alloc]
initWithTitleAngry"This gGame was Developed By:"
messageAngry"Burhan uddin Raizada"
delegate:nil
cancelButtonTitleAngry"Dismiss"
otherButtonTitles: @"@twitter" , nil];
[alertMsg show];

}

-(void)alertMsg:(UIAlertView *)alertMsg clickedButtonAtIndex:(NSInteger)buttonIndex {

if (buttonIndex == 1) {
NSString *containingURL = [[NSString alloc] initWithFormatAngry"http://www.twitter.com/brhanheck"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: containingURL]];
}
}
the first alertmsg is working absolutely fine. but when i added a like to the new "@twitter" button, then it just doesn't work. otherwise everything is working fine. i am wondering why it doesn't, but it should..need help.


- Gowtham - 10-02-2012 02:00 PM

As you said that your first alert message works properly, then what happens next??
You need to go through some basic books and tutorials. the basic syntax is off. It's (void), not {void}. It's (int) not {int}. Print should should be %d, not %i - etc... Very, very basic stuff.
I recommend you go through books and ask specific questions with road blocks you hit. Also, make sure you're specific about what error/issue you're hitting. Just not a code drop with what am I doing wrong?
Error-handling is very important with this issues, as you like to add the tweet button..! So try it out on some other new x-code.