• 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: NSLayoutManager question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLayoutManager question


  • Subject: Re: NSLayoutManager question
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 6 Feb 2003 11:34:35 -0800

On Thursday, February 6, 2003, at 11:21 AM, Koen van der Drift wrote:

I will try that when I'm at my Mac. In the meantime an additional question, is there a 'recommended' notification/delegate method to use after an NSTextView has been edited? So far I was using NSTextStorageDidProcessEditingNotification, resulting in the problems with the layout manager, but I don't have to use that notification per se.

NSTextStorage's notifications correspond to any change made at the model layer, i.e. to the NSTextStorage, for whatever reason. NSTextView is the view layer, and so it has notifications and delegate methods corresponding to changes to the text that were made as a direct result of user actions in the view.

The most relevant items here are the delegate method textView:shouldChangeTextInRange:replacementString:, which allows the delegate to be notified and to deny or modify any user change, and the NSTextDidChangeNotification and corresponding textDidChange: delegate method, which report on user changes after they have occurred. These last two are defined on the superclass NSText; see NSText.h for more information.

Douglas Davidson
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSLayoutManager question
      • From: Koen van der Drift <email@hidden>
References: 
 >Re: NSLayoutManager question (From: Koen van der Drift <email@hidden>)

  • Prev by Date: How to validate a number string ?
  • Next by Date: Re: Internet Config Example under Cocoa
  • Previous by thread: Re: NSLayoutManager question
  • Next by thread: Re: NSLayoutManager question
  • Index(es):
    • Date
    • Thread