Re: NSLayoutManager question
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.