Open sairamsankaran opened 11 years ago
Sairam,
I think the checkin is missing the ToDoListItemStore
class. Can you double check that file?
Just looking through the code quickly, are you assuming that a user never edits an existing item? It looks like there might be a problem if I try to edit a previous item.
Hi @timothy1ee,
I just checked my repository. The ToDoListItemStore
class is available.
Also, editing is supported as it is taken care by the Done's textFieldShouldReturn: method. It updates the datastore and hence updates the UI too.
I can show it to you in class.
On the other hand, I see some graphics lag issues. Especially when I delete the last item, the delete button takes some time before it vanishes. I guess it is because there is no item below it which moves up to cover it.
As I mentioned in my previous comment, you're not properly handling editing other items besides the newly created item. The problem is in - (BOOL)textFieldShouldReturn:(UITextField *)textField
, you're always assuming that the user is editing a particular item. Please fix this issue. Solving this problem was one of the most important learnings of this exercise.
Other than that, good work. Please implement the saving/restoring todo items by Friday. Use either NSUserDefaults or file I/O, NSArray has a built-in helper to load/save itself to disk. NSUserDefaults is a very commonly used tool, you should practice using it.
The next level is to be able to implement the multi-line to do item. It's an illustration of what it takes to really fine tune a UI. It's an intermediate level task. Not incredibly difficult, but may take you as long as the rest of the assignment.
exchangeObjectAtIndex:withObjectAtIndex:
editButtonItem
that automatically tracks the states of the editing state of the UIViewController. Here's my checklist of things I'm looking at when I'm reviewing this project.
Hi @timothy1ee,
I have fixed the bug to identify the edited cell.
I am trying to implement persistence with NSUserDefaults but strange things are happening when I run. It looks to be caught in an infinite loop. Steps I implemented:
1) When an item is added - get the userdefaults and update key with new list 2) When application loads, in viewDidLoad, get userdefaults and set application list to this value. I am getting the value in viewDidLoad correctly but setting it is a problem.
There seems to be a problem in setAllItems method. Debugger stops there with EXC_BAD_ACCESS
@timothy1ee
I think I have completed the other items in your checklist. Pls let me know. Thanks,
Hi @timothy1ee
I was able to fix all the bugs. I think it now works as specified. I will now work on the multi line item. Thanks,
Great, looks good, thanks for fixing the bugs.
Thanks for the confirmation!
@timothy1ee
Hi Tim,
Please find my submission for the To Do List assignment.
I am not sure if this is a problem. I made the mistake of starting the class names in lower case again (!) but corrected them in XCode and file structure later.
The problem is, this change of filename is not getting updated in Git.
If you are unable to run the app, please let me know and I will upload the project into a new repository and share again.
Thanks, Sairam