{"id":319,"date":"2022-11-02T13:35:06","date_gmt":"2022-11-02T13:35:06","guid":{"rendered":"https:\/\/www.trichview.com\/wp\/?p=319"},"modified":"2022-11-02T13:35:07","modified_gmt":"2022-11-02T13:35:07","slug":"info-spelling-checking-in-firemonkey-macos","status":"publish","type":"post","link":"https:\/\/www.trichview.com\/wp\/2022\/11\/02\/info-spelling-checking-in-firemonkey-macos\/","title":{"rendered":"[Info] Spelling checking in FireMonkey macOS"},"content":{"rendered":"\n<p>In FireMonkey for macOS, the platform offers a spelling checking service, so text components (including TMemo and TRichViewEdit v20.5.1+) can use it.<br>Unfortunately, the default implementation of this service has several problems that make it almost unusable.<br>See\u00a0<a href=\"https:\/\/quality.embarcadero.com\/browse\/RSP-39832\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/quality.embarcadero.com\/browse\/RSP-39832<\/a><\/p>\n\n\n\n<p>There is a workaround that solves the most important problem. It turns on language auto-detection instead of using two preferred dictionaries.<br>Add this code to your main form&#8217;s unit.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"theme:coda-special-board lang:delphi decode:true \" title=\"Code sample: enabling auto language selection on FireMonkey macOS\" >uses\n  ...\n  FMX.Platform,\n  {$IFDEF MACOS}FMX.SpellChecker.Mac,{$ENDIF}\n  ...;\n\n{$IFDEF MACOS}\nprocedure SetMacSpellCheckerLanguageDetection;\nvar\n  Svc: TMacSpellCheckerService;\nbegin\n  TPlatformServices.Current.RemovePlatformService(IFMXSpellCheckerService);\n  Svc := TMacSpellCheckerService.Create;\n  Svc.MaxUsedPrefferedLanguagesCount := 0; \/\/ language auto-detection\n  TPlatformServices.Current.AddPlatformService(IFMXSpellCheckerService, Svc);\nend;\n{$ENDIF}\n\ninitialization\n\n  {$IFDEF MACOS}\n  SetMacSpellCheckerLanguageDetection;\n  {$ENDIF}<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In FireMonkey for macOS, the platform offers a spelling checking service, so text components (including TMemo and TRichViewEdit v20.5.1+) can use it.Unfortunately, the default implementation of this service has several problems that make it almost unusable.See\u00a0https:\/\/quality.embarcadero.com\/browse\/RSP-39832 There is a workaround that solves the most important problem. It turns on language auto-detection instead of using two [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[15,18,10],"tags":[],"class_list":["post-319","post","type-post","status-publish","format-standard","hentry","category-firemonkey","category-information","category-trichview"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sergey Tkachenko","author_link":"https:\/\/www.trichview.com\/wp\/author\/sergey-tkachenko\/"},"uagb_comment_info":0,"uagb_excerpt":"In FireMonkey for macOS, the platform offers a spelling checking service, so text components (including TMemo and TRichViewEdit v20.5.1+) can use it.Unfortunately, the default implementation of this service has several problems that make it almost unusable.See\u00a0https:\/\/quality.embarcadero.com\/browse\/RSP-39832 There is a workaround that solves the most important problem. It turns on language auto-detection instead of using two&hellip;","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/posts\/319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/comments?post=319"}],"version-history":[{"count":1,"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/posts\/319\/revisions"}],"predecessor-version":[{"id":320,"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/posts\/319\/revisions\/320"}],"wp:attachment":[{"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/categories?post=319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trichview.com\/wp\/wp-json\/wp\/v2\/tags?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}