Mercurial > hg > soniczoomios
comparison UsernameAlertViewController.mm @ 42:3d627dce8bf0
Tidied up startup logic.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Wed, 17 Apr 2013 13:44:05 +0100 |
parents | a42903c61558 |
children | 0d3a993405e4 |
comparison
equal
deleted
inserted
replaced
41:79c129e500e1 | 42:3d627dce8bf0 |
---|---|
30 [self.alert show]; | 30 [self.alert show]; |
31 //[self.alert release]; | 31 //[self.alert release]; |
32 | 32 |
33 | 33 |
34 } | 34 } |
35 | 35 -(void)setAppRef:(id)theAppRef{ |
36 self.theOFAppRef = theAppRef; | |
37 } | |
36 | 38 |
37 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ | 39 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ |
38 | 40 |
39 NSLog(@"Entered: %@",[[alertView textFieldAtIndex:0] text]); | 41 NSLog(@"Entered: %@",[[alertView textFieldAtIndex:0] text]); |
40 NSString *userName = [[alertView textFieldAtIndex:0] text]; | 42 NSString *userName = [[alertView textFieldAtIndex:0] text]; |
41 if ([userName isEqualToString:@""]){ | 43 if ([userName isEqualToString:@""]){ |
42 [self showUserNamePrompt]; | 44 [self showUserNamePrompt]; |
43 return; | 45 return; |
44 } | 46 } |
45 eventLogger.setUsername([userName cStringUsingEncoding:NSASCIIStringEncoding]); | 47 eventLogger.setUsername([userName cStringUsingEncoding:NSASCIIStringEncoding]); |
48 ((testApp *)self.theOFAppRef)->startTimedSession(); | |
46 | 49 |
47 | 50 |
48 } | 51 } |
49 | 52 |
50 -(BOOL)textFieldShouldReturn:(UITextField *)textField{ | 53 -(BOOL)textFieldShouldReturn:(UITextField *)textField{ |