[Info] Spelling checking in FireMonkey macOS

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 https://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 preferred dictionaries.
Add this code to your main form’s unit.

uses
  ...
  FMX.Platform,
  {$IFDEF MACOS}FMX.SpellChecker.Mac,{$ENDIF}
  ...;

{$IFDEF MACOS}
procedure SetMacSpellCheckerLanguageDetection;
var
  Svc: TMacSpellCheckerService;
begin
  TPlatformServices.Current.RemovePlatformService(IFMXSpellCheckerService);
  Svc := TMacSpellCheckerService.Create;
  Svc.MaxUsedPrefferedLanguagesCount := 0; // language auto-detection
  TPlatformServices.Current.AddPlatformService(IFMXSpellCheckerService, Svc);
end;
{$ENDIF}

initialization

  {$IFDEF MACOS}
  SetMacSpellCheckerLanguageDetection;
  {$ENDIF}
Sergey Tkachenko

Recent Posts

About compatibility with RAD Studio 13.2

Embarcadero has just released RAD Studio 13.2. All our components are compatible with this version,…

4 weeks ago

RVMedia 12.1 – FFmpeg-related improvements

RVMedia has been updated to the version 12.1. Information about video This update adds a…

4 weeks ago

TRichView 24.2 – UI controls for FireMonkey again

We are pleased to announce the new release of TRichView, version 24.3. A trial version…

1 month ago

TRichView 24.2 – UI controls for FireMonkey

We are pleased to announce the new release of TRichView, version 24.2. A trial version…

3 months ago

RVMedia 12 – FFmpeg 8, speech to text (Whisper)

RVMedia 12.0 has been released. The trial version can be downloaded from https://www.trichview.com/download/ The full version:…

4 months ago

TRichView 24.1.3 – Copying and pasting images

This update improves clipboard image support in the Windows version of TRichView. Previously, the components…

5 months ago