B4J Question [BANano] [SOLVED] How can I create documentation from layout files?

Mashiane

Expert
Licensed User
Longtime User
Ola

Assuming that I have this layout... From the look of things, this follows some kind of tree structure. We have 3 parent items, each with different children etc. e.c


1621616595734.png


Each element, has a name and an element type and from the property bag, one is able to pick up which properties were used, i.e. the ones that are banano specific.

For example, looking at this VBottomSheet component..

1621616730190.png


There are some boolean and string props that are checked / unchecked and some strings that are completed and some not.

I'm curious. If possible, as some form of an explainer documentation.

The third element with VToolBar2, produces

1621616893740.png


So to create this, the tree is like this..

VBottomSheet2
VBottomSheet2>VSheet2
VBottomSheet2>VSheet2>VToolBar2
VBottomSheet2>VSheet2>VToolBar2>VLabel4
VBottomSheet2>VSheet2>VToolBar2>VBtn4


Each of these items have properties in the property bag.

So my ultimate documentation could for example, reading the layout elements, get the schema in this type of parent child relationship and also reading the properties that are specified (leave false out / empty strings)

For example..
VBottomSheet2\FullScreen:True
VBottomSheet2\HideOverlay:True
VBottomSheet2\Inset:True


Etc, etc. I can then generate a document / tree structure based on this for my eBook.

Is it possible to get a tree structure like this from the b4j layout files either with b4j / banano?

Hopefully I have explained my thoughts well. Thanks in advance for your advise and help.

?
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
The challenge in this is that the different elements all have different properties. :mad: In addition, it happens (certainly for the relatively new B4X image elements) that new and / or changes in both an element and its properties regularly occur.

In addition, a program can also have self-defined forms or add elements in runtime.

In short, proper and endless labor-intensive maintenance and therefore most likely never complete. ??

But if that doesn't stop you from developing and maintaining this for multiple platforms, you may find it useful to look at:

It is very telling that the great master writes:
It is an example. It doesn't support all of B4X programming language features :confused:

In short, don't let my considerations stop you. You can read the screen files and with a bit of luck you can find out how these are written based on very different tests. If you place each element as the only one on a screen, you can possibly go a long way on the basis of adding an element, filling in all the properties.
 
Upvote 0
Top