Re: Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?
Re: Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?
- Subject: Re: Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?
- From: Douglas Davidson <email@hidden>
- Date: Thu, 20 Nov 2008 13:10:26 -0800
On Nov 20, 2008, at 12:59 PM, Keith Blount wrote:
I've had some bug reports from users saying that accented characters
don't always work correctly in my software, but I've never been able
to reproduce it - until now. It seems that calling NSTextView's -
rangeOfUserTextChange: and -rangeOfUserCharacterAttributeChange:
wipes out marked text in a text view, and I'm wondering if this
sounds like intended behaviour before I file a bug report on this...
The problem in my case is that I call -rangeOfUserTextChange: or -
rangeOfuserCharacterAttributeChange: from interface validation code
(-validateUserInterfaceItem:) for certain items - for instance, to
check to see whether it is currently possible to annotate some text
(for which there must be some text selected that can have its
attributes changed). If there is a toolbar item that calls on such
validation code, suddenly accented characters stop working.
Yes, these methods unmark the text. They're generally intended to be
called when a change is actually going to be made. One alternative
would be for you to call -isEditable and -selectedRange in your
validation code instead.
Douglas Davidson
_______________________________________________
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