When completing a certain method that calculates a value, and sets a TText.text to that value, I get the following error thrown:
'String index out of range. (-1) Must be >=0 and <=0'
I made sure my calculation was safe and handled possible exceptions before and after they may occur. It is really just a simple addition calculation....
A quick google search led me to: Firemonkey: Setting TLabel Text causes String Index out of Range Exception
1) I am not using carriage returns though, nor any line breaks. This is my code for setting the ttext value -
TotalCost.text:='$'+FormatFloat('0.00',total);
2) It is not a TLabel, but a TText component.
3) This does not throw any errors on any Android Device, the simulator or my 4th gen iPad running iOS 9.0.2, but DOES throw errors on the newer iPhones also running iOS 9.
Any ideas on a workaround or bug fix? Hard to debug which line exactly throws the error since I do not have direct access to a newer iPhone nor does the devices I have or simulator throw an exception when debugging.
Thanks