Search code examples
delphifiremonkeydelphi-10.4-sydney

Delphi 10.4.2 FMX How to put address in String into TCivicAddress?


What is the way to initialize TCivicAddress and put address info into it? I even tried to set everything separately, it still encounter errors.

var cAddr: TCivicAddress;
cAddr.FeatureName := '10';
cAddr.Thoroughfare := 'Xxxxx Xxxxx Xxx';
cAddr.SubLocality := 'Xxxxxx Xxxxx Xxx';
cAddr.PostalCode := '12345';
cAddr.Locality := 'Xxxxxx';
cAddr.AdminArea := 'Xxxxxxx';
cAddr.CountryName := 'Xxxxxxx';

Is it not possible to create TCivicAddress from string? I can't seem to find documentation online.


Solution

  • TCivicAddress is a class that need to be instanciated before accessing any member.

    cAddr := TCivicAddress.Create;
    cAddr.FeatureName := '10';