Storage of module

klaus

Expert
Licensed User
Longtime User
I have begun to work with the modules, big improvement.

I find that it would be intersting that we could store the modules in a certain folder and the program knows where they are, without copying them to the program's folder. Because if we use the same module in 5 different programs it would be stored 5 times. If we make an improvement we must update all the modules in the other folders. If we had the modules in one dedicated folder we won't have to care about versions. The same for image files used in the module's forms.

The same principle could be applied for the libraries, the IDE knows where they are and especially now where most of them are embedded in the exe file.

Best regards.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The advantages you described are clear. However there are some disadvantages:
- A user can add an existing module and change it without considering the consequences it will have on several other projects. He can easily "break" an older project.
- Copying a project from one computer to another (or sharing in the forum) will be difficult.

While there are situations that the current implementation is more cumbersome it is for sure clear and simple to understand which modules are used by a project.

The libraries mechanism was improved in this version. If a library is missing, the IDE will try to copy it from the libraries folder to the source code folder.
I see one advantage in copying the libraries to the source code folder. If you are working inside an Activesync synchronized folder then the libraries will be in the right place on both the device and the desktop.
Maybe in a future version this concept will be changed.
 

agraham

Expert
Licensed User
Longtime User
A user can add an existing module and change it without considering the consequences it will have on several other projects. He can easily "break" an older project.
Yes, I've done this to myself :( in Visual Studio where you have the choice to copy or just "reference" another source file when you add it to a project. I always copy now. It's a bit more cumbersome if you want to make a global change but its safer.
 

klaus

Expert
Licensed User
Longtime User
Hi both,

I understand your points of view, I had used it in Visual Basic, found it convenient and was always happy with it.

I was not aware that the libraries are not in the B4PPC program folder on the device but only on the desktop. So I understand the advantage for copying the libraies to the program's folder.

Has the library mechanism already been improved in the beta version, or will it be in the final release ?
I imported an existing module that needs the FormLib which was not in the Main module's folder. I get the message that the module is copied to the program's folder, but for the library I get the message below.

Best regards.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Has the library mechanism already been improved in the beta version, or will it be in the final release ?
I imported an existing module that needs the FormLib which was not in the Main module's folder. I get the message that the module is copied to the program's folder, but for the library I get the message below.

It was already implemented but it deals with a different scenario.
The list of referenced libraries is only stored in the main file (sbp).
If you open an sbp and a library is missing then it will be automatically copied from the libraries folder.

Maybe it will be changed so modules will also store the list of used libraries.
 

Cableguy

Expert
Licensed User
Longtime User
The list of referenced libraries is only stored in the main file (sbp).
This is not so good for modules with DLLs...

If you open an sbp and a library is missing then it will be automatically copied from the libraries folder

Very nice feature, saves a lot of the forum's server disk space...;)

Maybe it will be changed so modules will also store the list of used libraries.

YES please!!!
 

klaus

Expert
Licensed User
Longtime User
I fully agree with Cableguy,

It would be very convenient if, when importing a module, the libraries would automatically be loaded if not yet in the Main program's folder.

The same feature would of course also be very convenient for the image files. I am mainly using ImageButtons rather than menus and therefore have several image files belonging to the module.

Best regards.
 
Top