「Xamarin.MacでNSTextViewのスマートクォートを無効化する」の版間の差分

imported>Administrator
imported>Administrator
 
(2人の利用者による、間の2版が非表示)
22行目: 22行目:


== 解決策:NSTextView単位で無効化する ==
== 解決策:NSTextView単位で無効化する ==
OSレベルでの解決方法が確実なのだろうが今から社内にある500台くらいの[[Mac]]に設定して回るとか正気の沙汰とは思えないので自動アップデートを搭載したアプリ単位で解決したい。
XIBファイルを開きNSTextViewの設定項目を眺めているとスマートクォート関連の設定があったわけだが、なぜかこのチェックを付けても外しても無効化できない。古い[[Mac OS X]]では動くようだが最近のやつはダメなようだ。
XIBファイルを開きNSTextViewの設定項目を眺めているとスマートクォート関連の設定があったわけだが、なぜかこのチェックを付けても外しても無効化できない。古い[[Mac OS X]]では動くようだが最近のやつはダメなようだ。


34行目: 36行目:
             // disable Smart Quotes  
             // disable Smart Quotes  
             // よくわからんのでAutomaticで始まるプロパティ全部にfalseを設定してみた
             // よくわからんのでAutomaticで始まるプロパティ全部にfalseを設定してみた
             _startupScript.AutomaticDashSubstitutionEnabled = false;
             _nsTextView.AutomaticDashSubstitutionEnabled = false;
             _startupScript.AutomaticDataDetectionEnabled = false;
             _nsTextView.AutomaticDataDetectionEnabled = false;
             _startupScript.AutomaticLinkDetectionEnabled = false;
             _nsTextView.AutomaticLinkDetectionEnabled = false;
             _startupScript.AutomaticQuoteSubstitutionEnabled = false;
             _nsTextView.AutomaticQuoteSubstitutionEnabled = false;
             _startupScript.AutomaticSpellingCorrectionEnabled = false;
             _nsTextView.AutomaticSpellingCorrectionEnabled = false;
             _startupScript.AutomaticTextReplacementEnabled = false;
             _nsTextView.AutomaticTextReplacementEnabled = false;
             _startupScript.EnabledTextCheckingTypes = 0;
             _nsTextView.EnabledTextCheckingTypes = 0;
         }
         }
     }
     }