Hi Andy,

>> 
>>  NSLog(@"isAutomaticTextReplacementEnabled %d", [NSSpellChecker 
>> isAutomaticTextReplacementEnabled]);
>>  NSLog(@"isAutomaticSpellingCorrectionEnabled %d", [NSSpellChecker 
>> isAutomaticSpellingCorrectionEnabled]);
>> 
>> but no corresponding set methods!?
> 
> 
> Note that you're messaging the NSSpellChecker class and not your NSTextView 
> instance.

I do both and realised in the meanwhile that the SpellChecker class methods 
reflect back the System Preferences settings. This is neat. I can’t use the 
since I don’t want to change anything system wide, only application specific.

>   So you can do this:
> 
>       [_textView setAutomaticTextReplacementEnabled:NO];

So what I currently do and what works is

   #ifdef __APPLE__
   [self setAutomaticQuoteSubstitutionEnabled:NO];
   [self setContinuousSpellCheckingEnabled:NO];
   [self setAutomaticTextReplacementEnabled:NO];
   [self setEnabledTextCheckingTypes:NO];  //  <-- this is critical and 
required to get rid of the unwanted text replacements
   #endif
   
However, the “setEnabledTextCheckingTypes:NO” line is necessary. If I commit 
that I still get replacements, e.g. two minus signs — are replaced with “?”. I 
for sure haven’t implemented this replacement!? It does not happen, if I paste 
the two characters into the textview, only if I type them!? Who is doing that 
and why? Shouldn’t this be suppressed with 
setAutomaticTextReplacementEnabled:NO!??

Thanks,

 Andreas







_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to