I think, we are adding it twice Routine *tempRoutine = (Routine *)NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext; tempRoutine. Name = entered; ----> eventsArray addObject:tempRoutine; routineTableView reloadData; ----> self addEvent; //comment this line in alertViewDelegate or you can use following code changes..... it may have syntax error (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex! = alertView cancelButtonIndex) { entered = (AlertPrompt *)alertView enteredText; if(eventsArray && entered) { self addEvent; } } } -(void)addEvent { Routine *routine = (Routine *)NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext; routine.Name=entered; NSError *error = nil; if (!managedObjectContext save:&error) { // Handle the error.
} NSLog(@"%@", error); eventsArray addObject:routine; NSIndexPath *indexPath = NSIndexPath indexPathForRow:eventsArray count inSection:0; self. RoutineTableView insertRowsAtIndexPaths:NSArray arrayWithObject:indexPath withRowAnimation:UITableViewRowAnimationFade; self. RoutineTableView scrollToRowAtIndexPath:NSIndexPath indexPathForRow:0 inSection:0 atScrollPosition:UITableViewScrollPositionTop animated:YES; } Thanks.
I think, we are adding it twice.... Routine *tempRoutine = (Routine *)NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext; tempRoutine. Name = entered; ----> eventsArray addObject:tempRoutine; routineTableView reloadData; ----> self addEvent; //comment this line in alertViewDelegate or you can use following code changes..... it may have syntax error - (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex! = alertView cancelButtonIndex) { entered = (AlertPrompt *)alertView enteredText; if(eventsArray && entered) { self addEvent; } } } -(void)addEvent { Routine *routine = (Routine *)NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext; routine.Name=entered; NSError *error = nil; if (!managedObjectContext save:&error) { // Handle the error.
} NSLog(@"%@", error); eventsArray addObject:routine; NSIndexPath *indexPath = NSIndexPath indexPathForRow:eventsArray count inSection:0; self. RoutineTableView insertRowsAtIndexPaths:NSArray arrayWithObject:indexPath withRowAnimation:UITableViewRowAnimationFade; self. RoutineTableView scrollToRowAtIndexPath:NSIndexPath indexPathForRow:0 inSection:0 atScrollPosition:UITableViewScrollPositionTop animated:YES; } Thanks.
RoutineTableView setEditing:!self. // Handle the error. Routine *tempRoutine = (Routine *)eventsArray objectAtIndex:indexPath.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.