Re: Uppercasing text as it is entered
Re: Uppercasing text as it is entered
- Subject: Re: Uppercasing text as it is entered
- From: Alastair Houghton <email@hidden>
- Date: Mon, 27 Aug 2007 13:59:23 +0100
On 24 Aug 2007, at 15:25, Todd Ransom wrote:
On Thursday, August 23, 2007, at 03:10PM, "Douglas Davidson"
<email@hidden> wrote:
Your requirements may have been generated based on assumptions taken
from English-language usage that don't necessarily apply everywhere.
You will need to think about what you want to do in general; for
example, you might delay the uppercasing operation until the entire
range to be cased has been entered, or at least a complete word. I
would suggest modifying the text in the text storage rather than
using a custom text storage subclass.
Douglas et al.,
Thank you for your replies. I will discuss with some of my
international users who understand the conventions used in the
industry so I can understand their expectations, which I think
differ from the unicode spec in some ways.
It's also worth saying that you may not actually need to uppercase
the text at all. Often people do such things when they're trying to
compare textual data in a case-insensitive manner, but there are
NSString methods that you can use for that (e.g. -compare:options:).
If you're doing this to compare things, you may also want to look at
the -(de|pre)composedStringWith(Canonical|Compatibility)Mapping
methods... unless you use those, you may find that [aString
compare:bString] == NSOrderedSame, but that ![aString
isEqualToString:bString].
When you're asking the list a question like this, where something
seems to be difficult, it's worth saying *why* you need to do it as
well as *what* you want to do. The advice you've been given so far
has all been to do with uppercasing text, but it may be that advice
about e.g. Unicode canonicalisation and comparison would be more
suitable.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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