RemoveObjectFromEmployeesAtIndex: not called


I have a pretty strange situation. I have added the removeObjectFromEmployeesAtIndex: and insertObject:inEmployeesAtIndex: methods to RaiseMan in order to implement undo. But my “Undo” menu item never gets enabled; after adding some logging, I found out that these two methods never get called when I add or remove employees.

I have already checked the following things:

  • No typos, method names are correct
  • As far as I can see, I have implemented ivar names exactly as in the book, namely “employees”

RaiseMan works perfectly; at this time I can’t see the reason why these two methods are not called…

As a side note, there seems to be some confusin about what action to connect the “Add” button to. In ch. 8, it says to connect it to add:, but ch. 9 appears to assume it is connected to insert:. I suspect the latter is correct. I have tried both, but no luck… any clues what to look for?



Hard to tell, maybe you should upload your solution somewhere and post the download link here, too


I too am finding the same.
I’ve even used the Big Nerd example code for chapter 8 as the base for adding undo and it simply does not activate the undo/redo menu items. Am I missing a trick in IB?


You have to get the spelling right for the insert and remove methods or the undo won’t work. It wasn’t working for me at first but I copy and pasted the methods from the author’s code and then it worked.