On Tue, Oct 6, 2009 at 8:46 PM, Adam R. Maxwell <[email protected]> wrote: > That's a fair question; I don't have a good definition :). However, if I > have a master-detail view with a non-editable textview, or am updating a text > view with live output from an NSTask, I don't care if the delegate gets > notified of changes (so have never seen a reason to call > shouldChangeTextInRange:replacementString:). There are other situations > where you might want to unconditionally replace the characters of the text > storage, as well. The doc examples I've seen don't call > shouldChangeTextInRange:replacementString:, but I haven't done an exhaustive > search.
If you have a non-editable text view, then you are probably just calling -setString: or -setTextStorage: on it anyway. In that case it does not make sense to call -shouldChangeTextInRange:replacementString:. I can't imagine the usefulness of replacing the contents of the text storage instead of just swapping in the new one. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
