• 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: Where and how do I know a save completed successfully?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where and how do I know a save completed successfully?


  • Subject: Re: Where and how do I know a save completed successfully?
  • From: Charles Jenkins <email@hidden>
  • Date: Fri, 08 May 2015 20:50:44 -0400

On May 8, 2015 at 1:09:01 PM, Quincey Morris (email@hidden) wrote:
In this case, the text view should probably use the document undo manager, though you may have to do extra work to coordinate its use with your document’s needs. To configure it, you should tell the text view what its undo manager is, via its ‘undoManagerForTextView:’ delegate method.


My NSTextViewDelegate section begins like this:

extension Document : NSTextViewDelegate {  /// Plug document undo manager into the text v

  func undoManagerForTextView( view:NSTextView )
    -> NSUndoManager?
  {
    var um = self.undoManager
    describeUndoManager( um, source:"NSTextViewDelegate.undoManagerForTextView:" )
    return self.undoManager
  }

I think the delegate is good, because its other methods get called. But this one doesn’t. I tell the text view its delegate is my Document instance as soon as possible in windowControllerDidLoadNib: — right after I test and find that my Document’s undoManager is NOT nil. So the situation remains that the Document has an undoManager, but the text view’s undoManager variable remains nil throughout execution. Is there still a step I’m missing?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Where and how do I know a save completed successfully?
      • From: Quincey Morris <email@hidden>
References: 
 >Re: Where and how do I know a save completed successfully? (From: Charles Jenkins <email@hidden>)
 >Re: Where and how do I know a save completed successfully? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Rotate a standard Cocoa control?
  • Next by Date: Re: Where and how do I know a save completed successfully?
  • Previous by thread: Re: Where and how do I know a save completed successfully?
  • Next by thread: Re: Where and how do I know a save completed successfully?
  • Index(es):
    • Date
    • Thread