Quick question...

Quick question...
When looking through the FMX sources in Delphi, I noticed the .ios and .android extensions to source files (e.g. FMX.Dialogs.ios.pas).

Is this just convention of does it affect how it's pulled in when compiled? E.g. when compiling for IOS it'll pull in .IOS.pas files, and android is .Android.pas files?

Comments

  1. Uwe, I am not ifdef-ing my uses clause, I am not referencing those units at all. I am 'commenting out' all content in both interface and implementation sections based on the platform, because I have to. Would be nice if this was done for me already. In many files I have 4 modifications because of this. And the file content itself did not change. It happens that the unit depends on other units, which I have changed.

    ReplyDelete
  2. In theory if you copy FMX.Dialogs.IOS.pas to your project directory you can change FMX.Dialogs.IOS.pas like you are saying and you will not have to use ifdefs. You would simply include FMX.Platform in your uses clause. That is the purpose of the platform naming. The IFDEFs already exist in FMX.Platform.pas. http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Classes.ComponentPlatformsAttribute is used in FMX.Dialogs.pas.

    ReplyDelete
  3. What if you have a change in the interface section of FMX.Forms?
    1) You need to include FMX.Dialogs.iOS to compile for iOS.
    2) You get errors if you compile for Windows.

    I don't have FMX.Dialogs.iOS in my installation, but I have changed FMX.Forms and FMX.Types3D, the unit where they so far refused to insert the prerequisites for the orthographic projection.

    ReplyDelete

Post a Comment