def insertObject(p, inEmployeesAtIndex:index)
NSLog("adding #{p} to #{employees}") # <= Not called, huh?
undo = @undoManager
undo.prepareWithInvocationTarget(self, removeObjectFromEmployeesAtIndex:index)
if !undo.isUndoing
undo.setActionName("Insert Person")
end
employees.insertObject(p, atIndex:index)
end
The Objective-C signature for this is:
- (void)insertObject:(Person *)p inEmployeesAtIndex:(int)index
Works in Objective-C but in my Ruby, the method is not recognized as a handler to be invoked when a Person object is to be inserted in the employees array. I should note that I created the employees array using Ruby syntax:
@employees ||= []
Changing this to:
@employees ||= NSMutableArray.alloc.init
makes no difference in this scenario.
Any hints with respect to what I'm missing here?
Thanks,
Steve