Oct 13, 2021 Replies: 13 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: Oct 13, 2021 Click to expand...
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
Vader Well-Known Member Licensed User Longtime User Oct 13, 2021 #2 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Oct 13, 2021 #3 Tool to convert b4xlibs code to XML: https://www.b4x.com/android/forum/threads/tool-b4xlib-xml-generation.101450/#content Large b4xlib: XUI Views. There are no permissions as permissions are extracted from the code. Vader said: Object Wrapper Owner Shortname Click to expand... No such attributes.
Tool to convert b4xlibs code to XML: https://www.b4x.com/android/forum/threads/tool-b4xlib-xml-generation.101450/#content Large b4xlib: XUI Views. There are no permissions as permissions are extracted from the code. Vader said: Object Wrapper Owner Shortname Click to expand... No such attributes.
Vader Well-Known Member Licensed User Longtime User Oct 13, 2021 #4 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@
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 Expert Licensed User Longtime User Oct 13, 2021 #5 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: Oct 13, 2021
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.
Erel B4X founder Staff member Licensed User Longtime User Oct 13, 2021 #6 Vader said: What is the purpose of the top "bits"? Click to expand... The headers are not related to b4xlib. They are always there. StaticCode = code module. B4A=True -> has no meaning. Ignore it.
Vader said: What is the purpose of the top "bits"? Click to expand... The headers are not related to b4xlib. They are always there. StaticCode = code module. B4A=True -> has no meaning. Ignore it.
Vader Well-Known Member Licensed User Longtime User Oct 13, 2021 #7 @Erel So I can treat "StaticCode" and "Class" the same for these?
Erel B4X founder Staff member Licensed User Longtime User Oct 13, 2021 #8 Types in non-b4xlibs are always classes. In b4xlibs, there could also be activities, services and code modules. I think that you can ignore it. In most (or all?) cases, the classes are the relevant types.
Types in non-b4xlibs are always classes. In b4xlibs, there could also be activities, services and code modules. I think that you can ignore it. In most (or all?) cases, the classes are the relevant types.
Vader Well-Known Member Licensed User Longtime User Oct 13, 2021 #9 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?
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?
Erel B4X founder Staff member Licensed User Longtime User Oct 14, 2021 #10 Better to ignore the type.
Vader Well-Known Member Licensed User Longtime User Oct 19, 2021 #11 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 ?
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 Oct 19, 2021 #12 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 XUI Views.xml 65.4 KB · Views: 479
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.
Vader Well-Known Member Licensed User Longtime User Oct 19, 2021 #13 @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.
@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.
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2021 #14 Default values never go into the XML.