Android Question conversion to b4xpage ?

bernardR

Member
Licensed User
Longtime User
Hello,

I made some big programs with classic b4a and I'm satisfied with them (30000 lines of code).
Being 72 years old, I hesitate to convert my codes for b4xpages.
It's probably a lot of work.

I did not find a tutorial in French.
Will the compatibility of future versions of b4a be maintained over time?
If I decide to convert my codes, can you tell me an example of a program with a multiple orientation produced in classic b4a and its conversion in b4xpages

Thanks for your help
 

LucaMs

Expert
Licensed User
Longtime User
I made some big programs with classic b4a and I'm satisfied with them (30000 lines of code).
Being 72 years old, I hesitate to convert my codes for b4xpages.
It is better not to convert large projects to B4XPages; it is not necessary and there will be no problems with future versions of B4A.


(Congratulations on your skills, given your age )
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Rest assured that as LucaMS has said there will be no problems in the future if you do not convert your app to B4XPAges. There is nothing magical or very different about a B4XPages app to a normal app. Basically a B4XPage app is just a normal single Activity that uses Panels as pages instead of separate Activities to avoid the Android lifecycle issues.
 
Upvote 1

asales

Expert
Licensed User
Longtime User
It is better not to convert large projects to B4XPages; it is not necessary and there will be no problems with future versions of B4A.
I hope so. ?
I have the same doubt. Old and big projects and I don't want to made cross plataform development.
To the new projects, I'm starting with B4xPages.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Being 72 years old, I hesitate to convert my codes for b4xpages.
Why should you rush a conversion? As a seventy year old I almost always can complete a standard B4A program converted to a B4XMainPage. Better stolen than badly conceived, there are plenty of examples and everyone is willing to help you with a specific question.

It's probably a lot of work.
I don't think your 30,000 lines of code were created without using one or more classes. And let a B4XPage now also be a special class, so really there is little new under the sun other than a small adjustment when moving the startup code to B4XMainPage. If you only want to keep developing in B4A, you don't have to worry about the code adjustments for B4J, B4I and B4R.
The only challenges lie in code written specifically for a specific programming environment to make that B4X work. But you don't need all that.

But, again if you only want to keep programming in B4A you don't have to convert any code from B4A to B4X other than your current B4A main page. It's easier if your current startup routine makes it work as a class first. Then it is a breeze to start it as a b4Xpages from B4XMainPages.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
There is a lot in the forums to help you improve your program code in the run-up to a possible later switch to B4XPages program.
Here are some articles that can help you with this:

https://www.b4x.com/android/forum/threads/b4x-features-that-erel-recommends-to-avoid.133280/

[B4X] "Code Smells" - common mistakes and other tips

If I decide to convert my codes, can you tell me an example of a program with a multiple orientation produced in classic b4a and its conversion in b4xpages
migration / update process:
  1. I would start by updating your B4A IDE to the latest version first
  2. Then update the SDK to the latest version
  3. Open your current program code and try to copy your main class into a new class like B4XMyCode
  4. Try to find which (process) global variables can moved to the B4XMyCode class
  5. Remove all unnecessary code from the main class which is not needed when initialize the B4XMyCode class
  6. Save the program code
  7. Select files options
  8. Right click Open Map
  9. Go back one directory for the program files location
  10. Then download the example ThreePagesExample from here: [B4X] B4XPages - Cross platform and simple framework for managing multiple pages
  11. Open the and unzip the example
  12. Start the example in a new IDE environment
  13. If needed put <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="XX"/> to solve this issue: targetSdkVersion with the (manifest editor). (warning #31)
  14. Go back to the file explorer and copy the full path address
  15. Go back to the example program IDE and click project
  16. Click add existing program
  17. Paste the full path address
  18. Select all your program (classes) names
  19. Follow the steps described in [B4X] B4XPages - Cross platform and simple framework for managing multiple pages
  20. Add your B4XMyCode class as the fourth B4XPages
  21. Add a second button on the Page2 layout and add the necessary code to open your B4XMyCode class as a B4XPages
This may help you if needed: How to refer to many variables in B4XMainPage from other pages

And most importantly: just keep programming fun by happy coding.
 
Upvote 0

Spavlyuk

Active Member
Licensed User
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Upvote 0

agraham

Expert
Licensed User
Longtime User
This choice does not exist in the settings of the video
It seems to be a two step process if sub-titles are off.
First do Settings -> Subtitles and you see' Off' and 'English(Auto-generated)' . Select English(auto-generated)

Now again do Settings -> Subtitles and you see' Off', 'English(Auto-generated)' and now 'Auto-translate '. Select Auto-translate and choose French
 
Upvote 0

bernardR

Member
Licensed User
Longtime User
Merci beaucoup. It is super!!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…