Registered U25487

Member since: Wednesday, 16 November 2016
Last login: 4 years ago
Profile viewed: 681 views

No Rank
Points: 0

Hi Email

If you select the short date format in OS what happens when you try your code again?

need to make sure it displays 28-Sep-2018 or similar in your OS time (bottom right usually) then do same test?



GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, aFormatSetting)
memo output:

DateSeparator: -
ShortDateFormat: dd/MMM/yy
isValidLocale: False

So the date separator is being pulled from "somewhere" in the OS, where is it getting the date format - its correct but not using the correct separator. should be dd-MMM-yy

if i change back to New Zealand for example i get:

DateSeparator: /
ShortDateFormat: d/MM/yyyy
isValidLocale: False

Which works "ok" but just because we use slashes.

If i cannot use GetLocaleFormatSettings to get the "format settings" as used by the OS how do i retrieve these?

its getting the - from somewhere(DateSeparator), why is that correct yet the short format is not (for US example)

Not sensible to do do date formatting for every county if the detail is present in the OS?


This is the code that is run:

aFormatSettings : TFormatSettings;


GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, aFormatSettings);


aFormatSettings returns with incorrect information. shortDateTime has / instead of - which is what is shown in OS and is also advised as DateDelimiter.

Welcome to try setting your PC (windows Region settings - USA) to this date time format then see what you get:

Short date dd-mmm-yyyy

But this end its broken. it thinks it is dd/mmm/yyyy as reported by the above function.


Tokyo 10.2.3

GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, aFormatSettings);

Returns format settings that are not as set in the OS. This causes econvert errors.

issue is when set to English US in OS, and date format is set to dd-MMM-yy in regional settings in the OS. (windows 10)
Delphi returns a short date format of dd/MMM/yy yet the date seperator is correct "-" in the returned aFormatSettings variable so the returned result from above is not correct.

This is same if using the default FormatSettings.

Is this a delphi bug?


Registered U25487 replied to the topic 'Firemonkey Label not have transparent background' in the forum. 4 years ago

What version delphi are you running? FMX has many bugs, latest version (10.2.3) probably the least amount of bugs... but still has artifacts around drawn labels sometimes.


Registered U25487 replied to the topic 'Web / Mobile Development' in the forum. 4 years ago

web is HTML5 typically, Mobile is Java for Android or cocoa for Apple.

I am not aware of any such technology that will do all well, if you are doing anything more than the most basic of apps native is the way to go professionally. EMB FMX is not quite there yet, beta is the best description i could give FMX on Android even on 10.2.3

Depending on what you need you might be ok with just a web app, keep it simple if you can, the less different executable packages to maintain the better. Web is then accessible on any browser, OS independent.


Registered U25487 replied to the topic 'reducing image resolution' in the forum. 4 years ago

This might help

I use streams to do the scaling, you could use file streams if this is the use.

Note i am also cropping but you could modify to scale without cropping.

procedure ScaleJpg(const Source, Dest: TMemoryStream; Width, Height : Integer);
  SourceImg, DestImg: TJPEGImage;
  Bmp: TBitmap;
  R: TRect;

  function CropRect(const Dest: TRect; SrcWidth, SrcHeight: Integer): TRect;
    W: Integer;
    H: Integer;
    Scale: Single;
    AOffset: TPoint;
    W := Dest.Right - Dest.Left;
    H := Dest.Bottom - Dest.Top;
    Scale := Max(W / SrcWidth, H / SrcHeight);
    AOffset.X := (W - Round(SrcWidth * Scale)) div 2;
    AOffset.Y := (H - Round(SrcHeight * Scale)) div 2;
    with Dest do
      Result := Rect(Left + AOffset.X, Top + AOffset.Y, Right - AOffset.X,
        Bottom - AOffset.Y);

  //Resizes a larger JPG image
  Bmp := TBitmap.Create;

    SourceImg := TJPEGImage.Create;
      //SourceImg.Scale := jsEighth;
      //Center and scale image
      R := CropRect(Rect(0, 0, Width, Height), SourceImg.Width, SourceImg.Height);

      Bmp.Canvas.StretchDraw(R, SourceImg);

    DestImg := TJPEGImage.Create;
      DestImg := TJPEGImage.Create;


Thank you Emailx45

However you have not read the question, how does your answer refer to FMX.DialogService?

I did not ask a question regarding TEdit. I am well aware you can set the keyboard type for a TEdit.

Please do not answer a question if you do not have the knowledge. This is the second time you have done this on my questions, you are wasting your time.

If however it is not possible with FMX to specify the input type of the dialog-service, i will put this in with the rest of the features that are missing from EMB software.

EMB if you are going to do something do it properly or not at all.



I wish to use the dialogue service but have number entry only, how do you do this? there is nowhere to set the keyboard or input type unlike in native android with SetInputType?

Are we stuck with qwerty keyboard?



Registered U25487 replied to the topic '[Android] How to get line number from ANR/ Crash report' in the forum. 4 years ago

I am specifically referring to this, not how to obtain an ANR report.

#02 pc 000000000054de7d /data/app/com.xxxx-2/lib/arm/ (???)

how do we translate the (???) to something meaningful. This looks like an offset: 54de7d but it does not match the MAP file it appears.



Registered U25487 replied to the topic '[Android] How to get line number from ANR/ Crash report' in the forum. 4 years ago



"comming weeks" would EMB care to reimburse us for subscription costs while we wait so we can use the product we have paid for? this is not acceptable and half baked. 10.2.3 is using API and NDK tools that are YEARS old, you cant do this to customers

Registered U25487 created a new topic ' [Android] How to get line number from ANR/ Crash report' in the forum. 4 years ago

Can anyone advise how to get the unit and line number in source code from ANR or crash reports on google play?

All I get from my internal code is the name then (???) line number or procedure called which makes debugging near impossible.

Have tried a lot of different compiler options but nothing seems to improve this. Map file offsets dont match up with the reported offset.


#00 pc 000000000001341c /system/lib/ (syscall+28)
#01 pc 0000000000017539 /system/lib/ (_Z33__pthread_cond_timedwait_relativeP14pthread_cond_tP15pthread_mutex_tPK8timespec+56)
#02 pc 000000000054de7d /data/app/com.xxxx-2/lib/arm/ (???)
#03 pc 00000000007d88b7 /data/app/com.xxxx-2/lib/arm/ (???)
#04 pc 00000000007d8a01 /data/app/com.xxxx-2/lib/arm/ (???)
#05 pc 0000000000069513 /system/lib/ (???)
#06 pc 00000000002443c7 /system/framework/arm/boot.oat (Java_android_app_NativeActivity_onPauseNative__J+90)
at (Native method)
at (
at com.embarcadero.firemonkey.FMXNativeActivity.onPause (


Registered U25487 replied to the topic 'Forums unusable' in the forum. 4 years ago

Both abysmal and amazing at the same time. Perhaps time to go to forum system not a free one?


Registered U25487 replied to the topic ' is UP!' in the forum. 4 years ago

Can someone please advise, why is this forum the replacement for the old forum? It looks like it has been built for teens and mobile platform, Hint: We don't use mobile to develop on. Hint: if we want facebook/twitter we would BE ON THOSE PLATFORMS.

Images for someones photo take up 20% of the post. Seriously useless information.

A single line reply takes up a huge amount of vertical space. I really dont want to see mine or anyone else's image of their favorite game or anime character when I am searching how to fix some EMB bug or workaround. IT IS JUST NOT IMPORTANT OR PROFESSIONAL.

Post width utilizes 1/3rd of a 2560 x 1440 display, is this too modern for this forum engine? Why design something that is bad when you can design something that is usable?

Information is buried and the categories are useless. Nowhere to discuss specific items such as mobile/ android/ FMX other than "programming"?

The old forum - poor but not this bad.

Having tools that are usable in a commercial environment is mandatory. This forum is not commercial grade.


Registered U25487 replied to the topic 'What Andorid NDK/API Combo in tokyo 10.2.3' in the forum. 4 years ago

so our latest and greatest version of RAD studio only supports: Android NDK, Revision 9c (December 2013)
That is 5 years old (!).

Anyhow I do have NDK r17b and API 28 compiling and running and deploying on 10.2.3, havent come across any specific issues relating to the NDK and API with the features we are using.


Registered U25487 replied to the topic 'How to target a particular Android SDK' in the forum. 4 years ago

The android target is in the xml file:


this is what i have done:

<uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="28" />

which seemed to work.


Registered U25487 created a new topic ' What Andorid NDK/API Combo in tokyo 10.2.3' in the forum. 4 years ago

Where can we find information on what NDK version and API combo we should be using?

Have installed and using API 28 but still on NDK r9c that was dated 2013 that comes with Tokyo 10.2.3

Can we (or should we?) use r17b with Tokyo?

Also why is there no android/ firemonkey specific forum topics? IMO the old forum was antiquated but better than this or is there another forum that we should be using?


and this is with XE10 Berlin Update 1, Im having issues with memory corruption, i found one issue in the Firedac Framework of bad unicode char conversion with buffer overruns, now looking for more of the same in DS...