• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disable Text Replacement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable Text Replacement


  • Subject: Re: Disable Text Replacement
  • From: Andreas Höschler <email@hidden>
  • Date: Wed, 11 Feb 2015 12:21:03 +0100

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 (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


References: 
 >Disable Text Replacement (From: Andreas Höschler <email@hidden>)
 >Re: Disable Text Replacement (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Using multiple bindings to enable a button
  • Next by Date: App crashes on launch when using Developer ID-signed Mac Installer Package
  • Previous by thread: Re: Disable Text Replacement
  • Next by thread: Color fun with IBOutlet named "appNameLabel"
  • Index(es):
    • Date
    • Thread