Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Introduction to Core Data Deleting and Updating Data Review: Deleting and Updating Data.

malcolm foong
malcolm foong
476 Points

Found a Bug in the code

Found one bug in the coding provided. Whenever i edit a cell and change the text inside the textfield, the changes does not show immediately. The change of text appears only after relaunching the app. Wonder who gets this bug too.

2 Answers

Huh your right that is a problem on the device. I only checked it in the simulator. Try this in ToDoListController:

    override func viewWillAppear(_ animated: Bool) {
        tableView.reloadData()
    }

This should reload tableView for you.

malcolm foong
malcolm foong
476 Points

:) It's all fine right now Brandon. Appreciate your help!

Works fine for me. Go back through the sections titled 'Fetching Data Using Fetch Requests'.

malcolm foong
malcolm foong
476 Points

Hi Brandon. Yes it seems to work fine. But i'm not sure if you've tested this out. 1) Try editing one of the cell. 2) When editing in Detail View Controller, delete whatever to-do-task you've entered in the textfield. 3) Try copying some words or sentences and paste it in the textfield and save it. 4) When you're in ToDoListController, do you still see the cell that you've updated? In my case, it didn't show the updated text that i've just saved, instead it shows the previous one. But when you click on the cell, you'll actually see the updated one inside detail view controller but not in ToDoListController.

It works well if you type in the textfield instead of copy & paste texts. I'm not sure why though.

Fyi, i've even downloaded and tested on the project file that is provided and it appears the same.