Re: Correct implementation of undoManagerForTextView
Re: Correct implementation of undoManagerForTextView
- Subject: Re: Correct implementation of undoManagerForTextView
- From: Jeremy Dronfield <email@hidden>
- Date: Thu, 4 Mar 2004 17:13:31 +0000
On 4 Mar 2004, at 3:20 pm, Jeremy Dronfield wrote:
- (NSUndoManager *)undoManagerForTextView:(NSTextView *)aTextView
{
return undoManager;
}
This made the entire undo system go haywire - e.g. hitting Undo
removed the entire contents of the view, undos failed to register, or
they registered but didn't enable the Undo menu item. As far as I
could tell, I now had three undo managers (or three conflicting
pointers to the same undo manager) - one for each delegate, plus the
default manager for the main window, which was still trying to manage
everything.
I just had another try at this, and managed to get it to work vis-a-vis
save warnings through querying -canUndo. However, now I've got a new
problem - the undos don't show up in the menu! Do I need to post them
individually, say through
-textView:shouldChangeTextInRange:replacementString:?
-Jeremy
========================================
email@hidden
theLocustFarm.net:
- fractious fiction at
http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.