On 07/10/2009, at 1:54 PM, Adam R. Maxwell wrote:

I think it's worth noting that Apple's code examples don't do this:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TextArchitecture/Tasks/SimpleTasks.html

The way I read the page Kyle linked to andhttp://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TextEditing/Tasks/BatchEditing.html is that this is only for user-initiated changes (which may or may not be appropriate, depending on what you're doing).

If this is really necessary, hopefully it'll be documented, or one of the text system guys can step in and clarify...I'd really like to know since I've been doing this for years without calling shouldChangeTextInRange:replacementString:.


Hmmm, now I'm a little confused again.

It seems I should be doing beginEditing/endEditing and/or shouldChangeTextInRange:replacementString:/didChangeText but it's not clear whether it's either/or.

Doing both seems to be harmless, but I also don't yet have confirmation whether the crash is fixed, since it's not reproducible locally anyway.

--Graham


_______________________________________________

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]

Reply via email to