Re: Crash while adding to NSTextView
Re: Crash while adding to NSTextView
- Subject: Re: Crash while adding to NSTextView
- From: Kyle Sluder <email@hidden>
- Date: Wed, 2 Feb 2011 16:36:01 -0800
On Wed, Feb 2, 2011 at 4:12 PM, Mark Allan <email@hidden> wrote:
> [consoleTextView replaceCharactersInRange:endRange withString:newText]; /**/ crashes here
You didn't call -shouldChangeTextInRange:replacementString: first, or
call -didChangeText when you were done.
When working with the text system, it's important to remember to check
both the NSText and NSTextView documentation. The text system is quite
possibly the most confusing part of Cocoa.
--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