[Adium-devl] [Adium-svn] rev 23077 - trunk/Source

Peter Hosey boredzo at adiumx.com
Sun Apr 6 19:43:46 UTC 2008


On Apr 06, 2008, at 12:01:10, Evan Schoenberg wrote:
> On Apr 5, 2008, at 11:59 PM, Peter Hosey wrote:
>> On Apr 05, 2008, at 19:48:04, evands at adiumx.com wrote:
>>> +	preferredLanguage = [[[NSUserDefaults standardUserDefaults]
>>> objectForKey:@"AppleLanguages"] objectAtIndex:0];
>>
>> Wouldn't it make more sense to keep the entire array, and try each  
>> language in turn? The system may not have a spelling-checker  
>> dictionary for the user's #1 language.
>
> How about this, which should accomplish the same idea but only  
> require trying each language in turn once?
>
> //Find the first language the user prefers which the spellchecker  
> knows about, then keep it around for future reference

Sounds good.

>>> +			[[NSSpellChecker sharedSpellChecker]  
>>> setLanguage:newChatLanguage];
>>
>> Statements like this should be conditional (-setLanguage:,  
>> uncharacteristically for a setter, returns BOOL). Taking care of  
>> the above would take care of this, too.
>
> What do you mean by making this statement conditional?

-setLanguage: returns BOOL, indicating whether the spelling-checker  
knows about that language. We currently drop that result on the  
floor. We should handle it by reporting the failure in some way  
(which we should still do if we can't find any preferred language).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20080406/ae74aa5d/attachment.sig>


More information about the devel mailing list