It is really a great way to develop cpp (Cross Platform Projects, I take this shortcut from Klaus) with shared classes.
But sometimes I have many small blocks of this #if B4A ... which makes the code not more readable. Also happens, that after developing the B4A version I test it in B4i (sometimes weeks later) and only now I see, that this will not work with B4i. Last case today: I have an InputStream, and .BytesAvailable is not supported in B4i.
So my Idea is, that the compiler could look for a fix named folder like ../../B4Xshared and in this folder (if exists) look for a class with same name as the intern class and than combine it like one class. Or the intern class has an "import" line for this.
Global objects, only used in one platform could be handled in the intern class part. This part could also hold special functions, or even overwrite the shared ones.
But sometimes I have many small blocks of this #if B4A ... which makes the code not more readable. Also happens, that after developing the B4A version I test it in B4i (sometimes weeks later) and only now I see, that this will not work with B4i. Last case today: I have an InputStream, and .BytesAvailable is not supported in B4i.
So my Idea is, that the compiler could look for a fix named folder like ../../B4Xshared and in this folder (if exists) look for a class with same name as the intern class and than combine it like one class. Or the intern class has an "import" line for this.
Global objects, only used in one platform could be handled in the intern class part. This part could also hold special functions, or even overwrite the shared ones.