Hi all,
after I developed some platform dependant libraries (B4A and B4J) now is time
to try develop a cross platform library that works on multiple platforms.
On this direction, I have developed two libraries, one for B4A and one for B4J, they do the same things
apart that do in a different way adapted to both platforms.
So I started a new B4XPages project, arranged both libraries on B4A and B4J and eventually B4i,
I used conditionals #If B4A #Else If B4J to adapt my code global variables and subs for both,
but now I encountered this problem.
How to handle inline java code for more than one platform ?
May is a stupid question, but it won't work for me, I tried this way:
But it don't work as expected.....
I even tried this way:
but even this don't worked.
Many thanks for help
after I developed some platform dependant libraries (B4A and B4J) now is time
to try develop a cross platform library that works on multiple platforms.
On this direction, I have developed two libraries, one for B4A and one for B4J, they do the same things
apart that do in a different way adapted to both platforms.
So I started a new B4XPages project, arranged both libraries on B4A and B4J and eventually B4i,
I used conditionals #If B4A #Else If B4J to adapt my code global variables and subs for both,
but now I encountered this problem.
How to handle inline java code for more than one platform ?
May is a stupid question, but it won't work for me, I tried this way:
B4X:
#If JAVA
#If B4A
// Java code for android
#Else If B4J
// Java code for desktop
#Else If B4i
// Java code for iOS
#End If
#End If
I even tried this way:
B4X:
#If B4A
#If JAVA
// Java code for android
#End If
#Else If B4J
#If JAVA
// Java code for desktop
#End If
#Else If B4i
#If JAVA
// Java code for iOS
#End If
#End If
Many thanks for help
Last edited: