I have the following in Delphi XE:
fSettings := TFormatSettings.Create(LOCALE_USER_DEFAULT);
But I always get a warning on compile:
W1002 Symbol 'Create' is specific to a platform
What is the correct way to do this, so that I do not get a warning?
You have two options
1) Use the overload version which uses a string instead of a TLocaleID
class function Create(const LocaleName: string): TFormatSettings; overload; static;
2) Disable the warning locally
{$WARN SYMBOL_PLATFORM OFF}
fSettings := TFormatSettings.Create(LOCALE_USER_DEFAULT);
{$WARN SYMBOL_PLATFORM ON}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With