• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Correct implementation of undoManagerForTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


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>)

  • Prev by Date: Re: Dragging files to NSTextView ...
  • Next by Date: Re: What if one can not redo and undo?
  • Previous by thread: Re: Correct implementation of undoManagerForTextView
  • Next by thread: Need Finder-like custom list contol in Cocoa
  • Index(es):
    • Date
    • Thread