Author Topic: Minor error in code example - Chapter 13 - Reordering, Deleting and Adding....  (Read 7732 times)

karen

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hi Kevin

I'm really enjoying reading your books again, since you've added the examples in Swift.  The books were good with Objective-C, but it's great to know that you update your books, without additional cost to the users.  However, if you were to write any more books on iOS development, I'd certainly buy those too.

My first post to your forum is to let you know that I spotted a mirror error in the code example, given in Chapter 13, under the section "Reordering, Deleting and Adding Table View Rows > Deleting Rows From a Table View".

self.toDo.deleteEntity(self.toDoList[indexPath.row])
self.toDoList.removeAtIndex(indexPath.row)


toDoList doesn't exist and should be toDo.entityList instead:

self.toDo.deleteEntity(self.toDo.entityList[indexPath.row])
self.toDo.entityList.removeAtIndex(indexPath.row)


At least, that's what worked for me!

Thanks again for such enjoyable books.

Karen
« Last Edit: August 19, 2015, 07:05:05 AM by karen »

kjmcneish

  • Administrator
  • *****
  • Posts: 719
    • View Profile
Karen,

You're absolutely right! Thanks for letting me know. I've corrected the typos for the next release of the book.

All the best!
Kevin