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

Time:12-18

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. Thanks in advanced.

CodePudding user response:

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

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