TMSFMXLED conflict

I Have some lines of code from the delphi wikidocs to set up mp database access. These work fine.


  LocalConnect.Params.Values['Database'] :=
      TPath.Combine(TPath.GetDocumentsPath, 'settings.s3db');

however as soon as I place a FMXLED on my form I get undeclared identifier combine and undeclaredidentifier Getdocumentspath.

How do I resolve.

Hi, 


We are not able to reproduce this here, TPath is not declared in any TMS FMX component.
Did you add the unit IOUtils to the uses list?

Kind Regards, 
Pieter

Code as below. Have made a simple project with the two objects in question and still generates.


FMX.Objects , FMX.TMSBaseControl, FMX.TMSLed are added when the Led goes on. If I remove FMX.Objects from the list the compiler error lines disappear. So does this mean it could be a compiler issue rather than a TMS issue?

unit TMSFMXLed;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, System.IOUtils,
  FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf,
  FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async,
  FireDAC.Phys, FireDAC.FMXUI.Wait, Data.DB, FireDAC.Comp.Client, FMX.Objects,
  FMX.TMSBaseControl, FMX.TMSLed;

type
  TForm1 = class(TForm)
    LocalConnect: TFDConnection;
    TMSFMXLED1: TTMSFMXLED;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.FormCreate(Sender: TObject);
begin
  LocalConnect.Connected := False;

  LocalConnect.Params.Values['Database'] :=
      TPath.Combine(TPath.GetDocumentsPath, 'settings.s3db');

  LocalConnect.Connected := True;
end;

end.

Found the solution 

TPath is in both System.IOUtils and FMX.Objects therefore need to change TPath to


Hi,


You can also change the order of the paths and set IOUtils as the last unit in the uses list.

Pieter Scheldeman2016-03-08 08:31:10