Customizing Objects Created by NSArrayController

Followed the book instructions, but no matter what I did, I couldn’t get the date to change on new objects. Then I cleaned the project, and everything worked.

Posting this here in case someone else runs into the same problem.

Doesn’t work for me – also cleaned a few times now but still when adding a new object the date is not being updated. Also followed instructions, set the class correctly etc.

It seems as though the override func newObject() is not being called – I added a println in it which is not being printed…

Any ideas?

I had to remove the connection between the Add button and the add: action then connect it again to get this working.

Yes it is a bug in InterfaceBuilder that when you are changing the class of an object, its actions are still sent to the previous class (they are not updated correctly)

The book should mention this.

Thanks for the help. I also had the issue and reconnecting the add button did the trick for me.