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%3a>
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 protected])
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 [email protected]