Re: NSTextStorage subclass question
Re: NSTextStorage subclass question
- Subject: Re: NSTextStorage subclass question
- From: Kyle Sluder <email@hidden>
- Date: Sat, 6 Feb 2010 18:42:35 -0800
On Sat, Feb 6, 2010 at 6:17 PM, Gideon King <email@hidden> wrote:
> I found the root cause of my problem - I was trying to call setSelectedRange and setTypingAttributes on my text view in the textStorage processEditing method, and the system didn't like that. I have altered it to use perform...afterDelay: and it works fine now.
This is not the correct way to fix this problem.
You should not have overridden -processEditing. You should instead
have implemented -textStorageWillProcessEditing: in your text
storage's delegate, which the documentation describes as the
appropriate place to "make changes to the text storage object’s
characters or attributes to enforce whatever constraints it
establishes."
--Kyle Sluder
_______________________________________________
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