Wish Layout file (.bal) binary format.

warwound

Expert
Licensed User
Longtime User
Can we modify a batch of layout files in any way?
I'm sure this was asked before and the answer was that the layout files use a binary format and can only be opened using the Designer.

I have the task to modify a batch of around 50 layout files, many of the layout files contain complex layouts and each one has three layout variants.
Each batch file needs a few similar operations performed:
  • Views such as Labels need to have their Tag property set to a value depending on the View's Text property.
  • Spinners need to be replaced with a custom Spinner DesignerObject i have created.
    So i need to replicate the old Spinner Height, Left, Top and Width properties in the new custom Spinner.

Updating these files using the Designer is proving to be a time consuming task and prone to human (i am a human lol) error.

Looking at the Core.jar LayoutBuilder loadLayout() method i can see where the layout files are open and that they are then parsed, but haven't looked in any real detail at how the binary layout file is parsed.

So my question: Can i open and modify the contents of a layout file using some java similar to the loadLayout() method?
And my wish: Can the binary format be documented in a reply to this question?

Thanks.

Martin.
 

DonManfred

Expert
Licensed User
Longtime User
+1

Sort of XML would be really great :)
 

nikolaus

Member
Licensed User
Longtime User
+1

I'd prefer css like styles

:) this is not mine, just can't get rid of it ....
 

warwound

Expert
Licensed User
Longtime User
Such a tool will be available next week. It will convert the bal files to json and vice versa. It will be written in B4J and the code will be available.

Thanks a lot - that'll make my life a lot easier.
 
Top