Fixes of TMemo for Samsung Android

One of my customer reported falling of the Delphi XE5 Application at his Samsung Android device.

DelphiBug

When he was quickly typing multiple lines after while the app crashed.

It took me while to get the problem replicated, but eventually I found the bug.

It’s at the FMX.Platform.Android unit at TTextServiceAndroid.DrawSingleLine procedure.

From some reason the FCaredPosition is out of the range of the FLines StringList.

Replace this code:

if (FLines.Count > 0) then

with

if (FLines.Count > 0) and (FCaretPosition.Y>=0) and (FCaretPosition.Y<Flines.Count) then

 

Or you can download fixed unit here and simply included it into your project.

Embarcadero recently released new version of Delphi – XE6. Well I would suggest them to focus on fixing bugs at existing XE5 for people who already purchased their product, rather then release new version ever few months.

2 comments

  1. Mbongni says:

    I download this Tmemo but it does not work for me. Can you please give onother TMemo update

    • pjstrnad says:

      HI,

      and can you please describe what is not working?

      You can’t compile it or it’s not showing or still falling.

      Please give me more data as it works for me perfect.

Leave a Reply

Your email address will not be published. Required fields are marked *