27 Oct
2009
27 Oct
'09
4:23 p.m.
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
FWIW, the third line of the body should read undo.prepareWithInvocationTarget(self).removeObjectFromEmployeesAtIndex (index) -Ben