• 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: Tue, 10 Feb 2015 17:42:03 +0100

Hi Jens,

> Have you tried turning off  automaticDashSubstitutionEnabled?

Thanks a lot for you response. I goggled for automaticDashSubstitutionEnabled and landed here:

	http://stackoverflow.com/questions/19801601/nstextview-with-smart-quotes-disabled-still-replaces-quotes <http://stackoverflow.com/questions/19801601/nstextview-with-smart-quotes-disabled-still-replaces-quotes>

On this page I found

Also you can use this for a more detailed control over the text replacement.

self.textView.enabledTextCheckingTypes = 0;
See NSTextView setEnabledTextCheckingTypes: <https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextView_Class/Reference/Reference.html#//apple_ref/occ/instm/NSTextView/setEnabledTextCheckingTypes:>

I finally solved the problem by doing:

- (id)initWithFrame:(NSRect)frameRect textContainer:(NSTextContainer *)container
{
   self = [super initWithFrame:frameRect textContainer:container];

   ...
   [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
   ...

   return self;
}


What puzzles me is that [self respondsToSelector:@selector(setAutomaticQuoteSubstitutionEnabled:)] returns NO!? How can this be?

Anyway, thanks a lot for your hint! Problem solved!

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


  • Follow-Ups:
    • Re: Disable Text Replacement
      • From: Andy Lee <email@hidden>
References: 
 >Disable Text Replacement (From: Andreas Höschler <email@hidden>)
 >Re: Disable Text Replacement (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Disable Text Replacement
  • Next by Date: Re: NSBezierPath + thin lines + antialias = :(
  • Previous by thread: Re: Disable Text Replacement
  • Next by thread: Re: Disable Text Replacement
  • Index(es):
    • Date
    • Thread