Double-click to modify task does not work (Solved)

Hi all,

I use Xcode 6.0.1. I have followed the instructions of the chapter to create the app (actually I have create the app twice, just to be sure I was not making any mistake). As said in the title, when I run the app I can add new task clicking on the button; however, if I double-click on an added task, I can’t change it.

Does this happen to anyone else? Am I missing anything?

I believe that, in order to modify a task, we use:

- (void)tableView:(NSTableView *)tableView
   forTableColumn:(NSTableColumn *)tableColumn

    [self.tasks replaceObjectAtIndex:row withObject:object];

    [self updateChangeCount:NSChangeDone];

In addition, in the BNRDocument.xib if I go in Text Cell the right hand column options “Behavior” is set on “Editable”.

I’m having the same thing…I haven’t figured it out yet…

Hi all,

I finally found the reason why I could not edit the task once added. Although, I only got one answer and apparently no-one else experienced this problem, I thought to post the solution I found. (Possibly this may persuade the moderator to add few lines somewhere in the (e-)book to explain this. :sunglasses: )

In my opening post I wrote

This is true for “Text Cell” on the left side of the Xcode window (the path to this is Window :arrow_right: Bordered Scroll View - Table View :arrow_right: Clip View :arrow_right: Table View :arrow_right: Table Column :arrow_right: Text Cell).

However, one should edit the “Behavior” to “Editable” somewhere else, see pic (sorry, I don’t know how to edit that, if you have a small screen like mine you cannot see the whole pic so you have to open the link on a new panel/window); the path is:
Window :arrow_right: Bordered Scroll View - Table View :arrow_right: Clip View :arrow_right: Table View :arrow_right: Table Column :arrow_right: Table Cell View :arrow_right: Table View Cell

PS. I should say that I have just upgraded on Xcode 6.1. (However, I think this is irrelevant for the sake of the previous discussion.)

thank you for posting this! this solved the issue i had (i’m also using xcode 6.1)

Thanks for posting the solution, I was almost pulling my hair out wondering why I couldn’t edit the row! I’m also using Xcode 6.1. Thank you :smiley:


Oh my god, I got so frustrated with the same problem of “cannot edit the row” in this chapter!
However, thanks to you guys, the problem is solved now!

Thank you, Raffo85 !!!

Thank you! Kept me from pulling out my hair to find this answer.

Here is best solution, because code that was posted above as a solution will not work as you progress.

Select the table view in Interface Builder, then attributes inspector and change Content Mode from View based to Cell based, now you can edit and save changes in text cells;)

Thank you @Raffo85, it worked for me too. Although, it wouldn’t save correctly. But another post solved that.