Re: Undo manager
Re: Undo manager
- Subject: Re: Undo manager
- From: Lorenzo <email@hidden>
- Date: Wed, 06 Apr 2005 10:56:53 +0200
Hi Bob,
I have finally implemented your suggestion. I created an unique undoManager
which I assigned to every window by overriding windowWillReturnUndoManager.
The undo works well, on all the windows, but it cannot register the
setActionName.
[[[self undoManager] prepareWithInvocationTarget:anObj]
SetValues:[anObj GetValues]];
[[self undoManager] setActionName:@"Move Object"];
I see only "Undo" in the menu item. Instead when I don't override
windowWillReturnUndoManager, I see the right action name "Move Object".
Do you know how to fix it?
Best Regards
--
Lorenzo
email: email@hidden
> From: Robert Clair <email@hidden>
> Date: Tue, 15 Mar 2005 18:42:36 -0500
> To: Lorenzo <email@hidden>
> Cc: Cocoa List <email@hidden>
> Subject: Re: Undo manager
>
> You need to:
>
> 1) allocate your own undoManger
>
> 2) hold onto it in some central place in your application
>
> 3) make sure this is the undoManager returned by [myWindow undoManager];
>
> you accomplish #3 by reading up on and implementing the NSWindow
> delegate method:
>
>
> - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)sender
>
> ....Bob Clair
>
_______________________________________________
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