TTMSFMXGrid and assigning object on Android

Using Delphi Berlin with update 1.
Pack version is 3.5.0.1
Grid version is 2.2.7.8

I follow the Developer's Guide for the TMS FMX Grid. Page 21 says:-

  Objects[Col, Row : Integer] : TObject

In my program I have a loop assigning the objects.

  ViewMainList.Add( MainObj );
  gridDisplay.Objects[  1,   iRow ] := TMainObj( ViewMainList.Count - 1 );

This code has been working correctly on a FMX Windows Client for many months.

Running it for the first time on Android I get the Segmentation fault (11) error on the line.

Any ideas on how to make it work on Android?

Regards,
   Peter Evans


Unfortunately casting an integer to an object is not supported on Android. Please add a real object and store the integer inside that object.

Thanks for the tip. I have now changed my code and it now works on Windowsand Android