Great, thank you. I've changed the validation code as per your suggestion and everything seems to be working fine now; I had been under the mistaken impression that these methods were always the right ones to call when checking the text that *could* be changed, so I had changed many references to -selectedRange to use these methods - which explains why I only got bug reports about accents in recent versions. Thanks again and all the best, Keith
--- On Thu, 11/20/08, Douglas Davidson <[EMAIL PROTECTED]> wrote: > From: Douglas Davidson <[EMAIL PROTECTED]> > Subject: Re: Is -rangeOfUserTextChange: supposed to wipe out marked > text/diacritical marks? > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Thursday, November 20, 2008, 9:10 PM > 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 (Cocoa-dev@lists.apple.com) 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]