Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct implementation of undoManagerForTextView



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.


References: 
 >Correct implementation of undoManagerForTextView (From: Jeremy Dronfield <email@hidden>)
 >Re: Correct implementation of undoManagerForTextView (From: Dustin Voss <email@hidden>)
 >Re: Correct implementation of undoManagerForTextView (From: Jeremy Dronfield <email@hidden>)
 >Re: Correct implementation of undoManagerForTextView (From: Dustin Voss <email@hidden>)
 >Re: Correct implementation of undoManagerForTextView (From: Jeremy Dronfield <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.