equal
deleted
inserted
replaced
201 -(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { |
201 -(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { |
202 if (self.listOfSavegames == nil) |
202 if (self.listOfSavegames == nil) |
203 [self updateTable]; |
203 [self updateTable]; |
204 NSString *oldFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:tagValue]]; |
204 NSString *oldFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:tagValue]]; |
205 NSString *newFilePath = [NSString stringWithFormat:@"%@/%@.hws",SAVES_DIRECTORY(),textString]; |
205 NSString *newFilePath = [NSString stringWithFormat:@"%@/%@.hws",SAVES_DIRECTORY(),textString]; |
206 |
206 |
207 if ([oldFilePath isEqualToString:newFilePath] == NO) { |
207 if ([oldFilePath isEqualToString:newFilePath] == NO) { |
208 [[NSFileManager defaultManager] moveItemAtPath:oldFilePath toPath:newFilePath error:nil]; |
208 [[NSFileManager defaultManager] moveItemAtPath:oldFilePath toPath:newFilePath error:nil]; |
209 [self.listOfSavegames replaceObjectAtIndex:tagValue withObject:[textString stringByAppendingString:@".hws"]]; |
209 [self.listOfSavegames replaceObjectAtIndex:tagValue withObject:[textString stringByAppendingString:@".hws"]]; |
210 } |
210 } |
211 |
211 |
212 } |
212 } |
213 |
213 |
214 #pragma mark - |
214 #pragma mark - |
215 #pragma mark Memory Management |
215 #pragma mark Memory Management |
216 -(void) didReceiveMemoryWarning { |
216 -(void) didReceiveMemoryWarning { |