Tool B4X Browser - please provide example B4xlibs to parse

G'Day peeps.
I'm working on adding B4xlib functionality to the B4X Browser. To do so, I need to ensure that I can parse these files as required.
I can't find any specific documentation on what these files can/do contain, so I have to rely on examples from others.

B4X Browser already handles the following when reading legacy XML files. I want to ensure that the same/equivalent functionality is provided (if possible) when reading B4xLib files.
Classes
Comments
Events
Name
Permissions
Object Wrapper
Owner
Shortname

Methods
Description
Parameters
Return Value
Syntax

Properties
Description
Read Only / Read Write
Return Value
Syntax

Designer Properties
Default value
Description
Field Type
Read Only / Read Write

Fields
Description
Return Value
Syntax

If you know of some documentation, and/or can provide example(s) file(s), then please do so. Without your input this task will likely require multiple iterations to ensure it's correctness.

Thanks in advance

Dave

@Erel, @agraham
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
If I wasn't clear in the post above, ideally I need to have an example library (or two) that has ALL of the available "syntax" populated.
 

Vader

Well-Known Member
Licensed User
Longtime User
What is the purpose of the top "bits"?
e.g.
B4J=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=7
@EndOfDesignText@
=================================
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=8.5
@EndOfDesignText@
#Event: StateChanged (Open As Boolean)
=================================
B4J=true
Group=Default Group
ModulesStructureVersion=1
Type=StaticCode
Version=7
@EndOfDesignText@
 

hatzisn

Well-Known Member
Licensed User
Longtime User
For B4X libs click on my signature in "My Contributions to the community" link where there are some (also B4R).
Your program though already has support for B4X libs (indirectly at least). All you have to do is create the XML file with the b4xlib2XML tool and then just add a second link in the Library Paths in settings to the folder where the XLM is located.

Edit - @Erel already mentioned the b4xlib2XLM tool. I should have read the entire thread.
Edit 2 - I mentioned that your program already has support for B4X libs. A good update though is always welcomed in the community so keep up the good work.
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
So, are you saying that I should ignore files within the lib that aren't "Type=Class" ? Or just ignore "Type=" and show all types?
 

Vader

Well-Known Member
Licensed User
Longtime User
If someone could create and send me the XML file for XUI Views, that would help me immensely. I can't seem to get the lib2XML tool working 😢
 

klaus

Expert
Licensed User
Longtime User
Here you are.
The file was generated with Erels tool b4xlib2XLM.
Open b4xlib2XLM, open the file browser and drag and drop the xxx.b4xlif file into the b4xlib2XLM form and you will be prompted where to save the xxx.xml file.
 

Attachments

  • XUI Views.xml
    65.4 KB · Views: 99

Vader

Well-Known Member
Licensed User
Longtime User
@Erel I think I have found a bug with the b4xlib2XLM tool...
If the b4xlib contains the following:

Sub Class_Globals
[SNIP]
Public B4iCancelButton As String = "Cancel"
[/SNIP]
End Sub

The created XML file is as per the following...

[SNIP]
<field>
<name>B4iCancelButton</name>
<comment/>
<returntype>String</returntype>
</field>
[/SNIP]

Note how the default value ("Cancel") has been lost.
 
Top