B4J Library [B4X] BalConverter - Convert the layouts files to JSON (and vice versa)

ilan

Expert
Licensed User
Longtime User
Sounds like a bad idea. You should learn how to use anchors and designer script...

i do know how to use anchors. for me anchors is not the way i want to work with. i like more my approach and the results are much better. i agree that if i do an app for ipad and iphone then i will get bad results but this i solve with variants or 2 different layouts 1 for ipads and 1 for iphones.
 

hwatech

Member
Licensed User
Longtime User
I created a number of JSON files in the Forms Builder and now I would like to convert those to layouts for another project but I'm having trouble using this utility. All my libs are up to date and I'm running B4J 8.90. Initially when I ran the app I got the following error

It didn't seem as though I should have needed to but after I made a change to initialize the Map, I got a bit further but then this error occurs

I'm not exactly sure what to do at this point...
 

hwatech

Member
Licensed User
Longtime User
Just realized that the 2 errors I included in my previous post are the same error. I guess the code I put in to initialize the Map didn't do anything except make the error appear 2 lines later
 

hwatech

Member
Licensed User
Longtime User
OK, sorry for the trouble , but the first line of this this thread is

BalConverter is a B4J app (desktop app) that converts between the designer layout files and JSON format.

And the first line of the thread in which you announced this utility

is
Can we modify a batch of layout files in any way?

and since the FormBuilder saves as JSON file and is Loaded in the code...

You might see where a bad assumption could be made


so, where do I find the specification of the binary format of the layout files? I'd like to write a utility that converts some VS Designer files if possible

I may still be interested in this utility because I have 100s of programs that I have written in visual studio, some with fairly large form designs. I would just like to save some time if I convert them to to B4X. I already have the designer files in JSON but this utility doesn't like them either, it might help if I could go directly to the binary format

I'm an old C guy so binary formats don't bother me.

Larry
 

iHunner

New Member
Is the Exe still in the attached files? I downloaded the zip but don't see it. Apologies if this is a dumb question, I'm rather new here
 

xiaoyao

Active Member
Licensed User
Longtime User
Is there any other third-party software that can achieve this, such as a more advanced visual form interface designer developed with VB.NET, C#, or python? You can see the effect immediately after modifying the title or picture.

likie this,it's like :winform ui to python ui controls:

 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Your post has nothing to do with this thread.
 

xiaoyao

Active Member
Licensed User
Longtime User
For example, I can design the interface using a third-party tool like VB.NET or C# on WINFORM, convert it to the XML or JSON format supported by B4A, and then convert it to the BAL file format. That's my idea. The principle of the picture I posted is to use a third-party IDE like Visual Studio and WINFORM controls to convert to Python code or XML configuration files. The same principle can be applied to convert to the B4A format, of course, but it will take a lot of time to match.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…