B4J Question [BANano] [SOLVED] Helpers to produce documentation from layouts using key value pairs?


Licensed User
Longtime User
Hi there

I was thinking of a way to quickly producing documentation from already existing Kitchen Sink of BVAD3. Im thinking that perhaps getting a JSON object from the complete BANano.LoadLayout() could be awesome.

One thought was...

1. Perhaps add on the b4x forum wishlist. That when one right clicks a custom view, an additional menu that could be named "To JSON" could be added which could give one a JSON of key values for provided / entered property bag options.


2. Perhaps one inside BANano can get an object / Map that is the global result of that BANano.LoadLayout() statement, one can log this out or create another file based on the contents.

Is this something that is possible?

Thanks in advance.


Licensed User
Longtime User
You can write such a tool yourself to convert layouts to json
You are right..

I just remembered.. there is stuff like this

    'get the parent
    Dim Ret As Long
    Dim AllViews As Map
    'load button icon and clear the placeholder
    Ret = BANano.LoadLayoutArray("#placeholder", "buttonicon", True)
    ' ret returns a unique number you can use to get all views
    AllViews = BANano.GetAllViewsFromLayoutArray(Module, "buttonicon", Ret)
    'get the tooltip title
    Dim buttontooltiptitle As VDiv = AllViews.Get("buttontooltiptitle")

Perhaps if I am able to access the views like this I can just be successful in generating a JSON of all content on the loaded layout. This could be the solution I'm looking for.

Upvote 0