Hi all,
today I was in the process of cleaning up my Development directory tree and stumbled on what I named long ago MyLibs directory.
It used to contain directories dedicated to each one of my libs.
Now, since the advent of the new format (b4xlib) I have a few dirs containing just the *.bas files, the manifest.txt and the Files dir. Creating a lib from this material is a matter of seconds.
But what about the updating of that code?
Launching the IDE and trying to open/access the code of a b4xlib, it seems not possible since the IDE looks for a project file (e.g. *.b4a).
What I did was to create a "File/New/Default project" (IDE menu) so to have a "fake" project in my dir. Then I added to this projects all the *.bas files that make up the b4xlib to manage (i.e. update) and substituted the default Files dir with the one from my lib. Finally I removed the reference to the Layout.bal file and commented both the Activity.Loadlayout and the Button1_Click code.
Now I can open my fake project and update the code belonging to the lib.
This was because I already had the lib but missed the "create a fake project" step when I first wrote it.
For a new b4xlib I could start with the creation of a fake project like described above, but a much better way will be to make use of a "project template" so to create just what is needed.
I share this because I couldn't find any similar advice in the Forum.
Update: to make this post more complete, please find attached a "b4xlib" template based on the above description. Put it in your Additional Lib directory in the B4A folder (I quickly prepared it for B4A only)
today I was in the process of cleaning up my Development directory tree and stumbled on what I named long ago MyLibs directory.
It used to contain directories dedicated to each one of my libs.
Now, since the advent of the new format (b4xlib) I have a few dirs containing just the *.bas files, the manifest.txt and the Files dir. Creating a lib from this material is a matter of seconds.
But what about the updating of that code?
Launching the IDE and trying to open/access the code of a b4xlib, it seems not possible since the IDE looks for a project file (e.g. *.b4a).
What I did was to create a "File/New/Default project" (IDE menu) so to have a "fake" project in my dir. Then I added to this projects all the *.bas files that make up the b4xlib to manage (i.e. update) and substituted the default Files dir with the one from my lib. Finally I removed the reference to the Layout.bal file and commented both the Activity.Loadlayout and the Button1_Click code.
Now I can open my fake project and update the code belonging to the lib.
This was because I already had the lib but missed the "create a fake project" step when I first wrote it.
For a new b4xlib I could start with the creation of a fake project like described above, but a much better way will be to make use of a "project template" so to create just what is needed.
I share this because I couldn't find any similar advice in the Forum.
Update: to make this post more complete, please find attached a "b4xlib" template based on the above description. Put it in your Additional Lib directory in the B4A folder (I quickly prepared it for B4A only)
Attachments
Last edited: