I have a number of code-only B4Xlibs that started out life as B4A classes but are now shared libraries.
It seems logical that the class should exist as a native class module but remain attached to an empty project so that the class can be maintained, debugged and benefit from the code tips and other tools provided in the IDE. I am trying to streamline that workflow.
In an empty project it is easy to test class functions using Log()
Sub Globals
Private mbl As MyB4Xlibrary
End Sub
Sub Activity_Create(FirstTime As Boolean)
mbl.Initialize(Null,Null)
Log(mbl.DonksToSquirts(698654))
Log(mbl.WidgetsToSkyhooks(567))
End Sub
It occurred to me that it would be quicker to dispense with a bridge connection + device and simply use B4J as the parent project to maintain the class module. Once that is done the comment:
'Click to build b4xlib: ide://run?file=%JAVABIN%\jar.exe&WorkingDirectory=..&Args=-cMf&Args=\MyAdditionalLibs\Library\MyLib.b4xlib&&Args=..&Args=*.bas&Args=manifest.txt
Can be executed to build the .b4xlib to the path specified in the additional libraries dialog.
I am a little concerned however as my initial attempts failed with no content appearing in the library once declared..... or the library simply not being recognised as a library. I believe.......
- The manifest file appears always as the same format.
- The class (.bas) has to have the same name as the ultimate .b4xlib
My question is..... In using B4J to host the class module will the metadata (from what was originally a B4A or B4i class) be corrupted or is this an easier method of maintaining .b4xlibs ?