It's just an idea: what, if we could in a Class, Activity or Page write a compiler directive like this?
The compiler would take the text of this file (code A), find this line and so also take the text of referred file (code B).
In Code B it would search for Sub Process_Globals, Globals and Class_Globals, collect all type definitions in it and add it to the same named subs in code A, if not existing already there.
Also it would collect all other Subs in Code B and add to the end of Code A, if not existing already there.
Only than it would compile the now manipulated Code A.
Why?
We could inherit one class from another. Only one time define a basis class and than make different variations from it with very clean code. Not only with Custom Views a good thing.
Also very useful for cross platform development. We could write most in the shared class and inherit it in the pages / activities of B4i / B4A, where we only put the differences between the platforms.
What do you think?
B4X:
#Inherits: ..\BasisClass.bas
The compiler would take the text of this file (code A), find this line and so also take the text of referred file (code B).
In Code B it would search for Sub Process_Globals, Globals and Class_Globals, collect all type definitions in it and add it to the same named subs in code A, if not existing already there.
Also it would collect all other Subs in Code B and add to the end of Code A, if not existing already there.
Only than it would compile the now manipulated Code A.
Why?
We could inherit one class from another. Only one time define a basis class and than make different variations from it with very clean code. Not only with Custom Views a good thing.
Also very useful for cross platform development. We could write most in the shared class and inherit it in the pages / activities of B4i / B4A, where we only put the differences between the platforms.
What do you think?