Android Question Call for step-by-step guide for default project to b4xpage conversion

toby

Well-Known Member
Licensed User
Longtime User
I have a need to do the conversion for a relatively large project. While the following the thread points me to the right direction:
it lacks the details (such as adding b4xpage library, setting orientation to portrait, replacing code in the project file starting at Sub Process_Globals ). The conversion is tricky and a single mistake could corrupt your project. Follow @Erel's advice: Backup first.

I'm wondering whether @klaus has finished the guide.

@LucaMs's idea of a tool is very good.
 

LucaMs

Expert
Licensed User
Longtime User
@LucaMs's idea of a tool is very good.
I think you are referring to the last thing I wrote as reply to this "Wish". In that post, however, I only hinted at the possibility of updating my very old tool, AddLogs, to today's projects, which can be B4XPages or not.
[ :oops: Nov 26, 2014]

Creating a tool that transforms a classic B4A project into a B4XPages is practically impossible.
Also, it is not recommended to do this transformation unless the original project is quite small.


such as adding b4xpage library,
B4XPage library, as "custom type", does not exist. In a B4XPages project you add the same libraries as always. Maybe you are referring to the B4XLib libraries, which are not the classic .jar files but which are not B4XPages projects either and can be used both in this type of projects and in the "classic" ones.


replacing code in the project file starting at Sub Process_Globals
I didn't understand this; do you have executable code inside the Sub Process_Globals? This would be a mistake, that Sub must only contain global variable declarations.
 
Last edited:
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
Sorry for the confusion, I thought the following meant a guide to convert default project to B4XPages
Roger Daley said:
You make it sound easy. Any chance of Klaus type booklet with pictures for the really slow people?
It is in work.

Klaus Switzerland
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
Could you please send a link to that chapter in question of the web based guide.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
@klaus, thanks for the link! I prefer your way which is more reliable:
1. Create a B4XPage project
2. Copy & paste code from the default activity project.

I've found that editing source code using a text editor is like opening a can of worms.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
I am the author of the snippet. I can assist you in your conversion process.
Thank you very much for your generous offer! Your method is good for small projects; I've converted a dummy project successfully that way.

For relative large projects that are designed to be published, like the one I'm working on, they shouldn't be converted, as @LucaMs has suggested.

To err is human, therefore I wouldn't want to convert another project, either way, unless I really have to. This is my personal preference based on my experience.
 
Upvote 0
Top