Custom NSView and NSUndoManager
Custom NSView and NSUndoManager
- Subject: Custom NSView and NSUndoManager
- From: Benjamin Dunton <email@hidden>
- Date: Wed, 9 Nov 2005 21:00:39 -0500
All,
I have a bunch of custom NSView objects that can have their size
changed by the user. I have the following code to handle undo/redo:
NSResponder *resp = [window firstResponder];
NSUndoManager *undo = [resp undoManager];
[[undo prepareWithInvocationTarget:objClicked]
setFrame:[objClicked frame]];
[objClicked setFrame:newRect];
However, the undo menu does not become enabled after the above code
is executed. Looking in the debugger, I do see the undo stack get
the information put on it; however I can not undo my changes. I have
looked at the other NSUndoManager questions, but nothing has fixed my
problem.
Thanks,
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden