Registers the invocation with the current undo grouping. This method is part of the NSInvocation-based undo registration as opposed to the simpler
[-registerUndoWithTarget:selector:object:]
technique.
You generally never invoke this method directly. Instead invoke
[-prepareWithInvocationTarget:]
with the target of the undo action and then invoke the targets method to undo the action on the return value of
-prepareWithInvocationTarget:
which actually is the undo manager. The runtime will then fallback to
-forwardInvocation:
to do the actual registration of the invocation. The invocation will added to the current grouping.
If the registrations have been disabled through
-disableUndoRegistration
, this method does nothing.
Unless the receiver implicitly groups operations by event, the this method must have been preceded with a
[-beginUndoGrouping]
message. Otherwise it will raise an NSInternalInconsistencyException.
Unless this method is invoked as part of a
[-undo]
or
[-undoNestedGroup]
processing, the redo stack is cleared.
If the receiver
[-groupsByEvent]
and this is the first call to this method since the last run loop processing, this method sets up the receiver to process the
[-endUndoGrouping]
at the end of the event loop.