It's becoming very easy now to create apps that work on both iPhone and Android, with XUI and other b4x libraries.
However, when it comes to handling the events, I now find that there are some things - displaying an XUI dialog box, for example, and getting the info back from the choices it provides to the user - that are exactly the same code on both platforms.
But, if it's handling events, it can't be in a static code module shared between b4i and b4a. As a result, I end up copying and pasting a lot of code between the two IDEs. You can get round some of this by creating new classes, but not all.
So, I think it would be good to have either the equivalent of a #include directive or - probably more in keeping with the way the IDE works at the moment - an 'Additional Main' module type, which can be added to a project, and shared across projects, which is effectively just appended to the real Main module at compile time.
However, when it comes to handling the events, I now find that there are some things - displaying an XUI dialog box, for example, and getting the info back from the choices it provides to the user - that are exactly the same code on both platforms.
But, if it's handling events, it can't be in a static code module shared between b4i and b4a. As a result, I end up copying and pasting a lot of code between the two IDEs. You can get round some of this by creating new classes, but not all.
So, I think it would be good to have either the equivalent of a #include directive or - probably more in keeping with the way the IDE works at the moment - an 'Additional Main' module type, which can be added to a project, and shared across projects, which is effectively just appended to the real Main module at compile time.