I am trying to use System.Contnrs in a android project - why the heck am I getting a file not found error? Its finding every other damn RTL unit, just not System.Contnrs......

I am trying to use System.Contnrs in a android project - why the heck am I getting a file not found error?  Its finding every other damn RTL unit, just not System.Contnrs......

Getting  unit scope "System" indicates Android, iOSDevice, Win32, Win64, OSX32, iOSSimulator only (for a Android target).......

Suggestions?

Comments

  1. System.Contnrs is not supposed to be used in mobile projects. You're supposed to use Generics and no Generics don't blow up your binary. That topic has been addressed ;-)

    ReplyDelete
  2. Really? There is no indication that its not supported

    ReplyDelete
  3. Uwe Schuster  Where does it state that TObjectList or other containers found in System.Contnrs can't be used in Mobile apps?  I haven't heard that restriction before... (I'm not currently utilizing XE5 yet.)

    ReplyDelete
  4. I can't find anything about it either..... I keep looking.....

    ReplyDelete
  5. See mobile white paper:

    "Use the generic container classes defined in the unit Generics.Collections. The old-style Contnrs unit is not available on the mobile platform, because it is based on a pointer list (the non-generic TList class) and won’t work properly with the ARC memory management model."

    ReplyDelete
  6. Ahhhhhh, that answers it then. They need to add that to the documentation

    ReplyDelete
  7. Thanks - so it sounds like not just Contnrs but TList isn't available either?

    ReplyDelete
  8. Uwe Schuster How has that been addressed? Or only for mobile compilers? The last time I did some checks for multiple instantiations of some generic types the binary grew linearly - that was for the windows compiler though.

    ReplyDelete
  9. Stefan Glienke That was just irony, because size matters more for mobile than for desktop.

    ReplyDelete
  10. Uwe Schuster Damn and I was really hoping I missed something :(

    ReplyDelete
  11. And they are still asking why people do not upgrade... I dare not think of the terrible day when some clever head at Emb. forces ARC and related crap (marshalling etc) into the "desktop" compiler. There still are developers around who care about performance and code size!

    ReplyDelete
  12. That's coming, there is no escaping it

    ReplyDelete
  13. For desktop? I doubt. At least not for VCL applications.

    ReplyDelete
  14. For fmx, its certainly going to happen. Maybe not for vcl, but then again maybe the vcl itself is doomed

    ReplyDelete
  15. Unless MS abandons the WinAPI in the future which is very unlikely the VCL will stay.

    ReplyDelete
  16. But they already have a "working" replacement 😂

    ReplyDelete

Post a Comment