[Gambas-user] Use of a Gambas library in a module
T Lee Davidson
t.lee.davidson at gmail.com
Sun Oct 21 04:08:15 CEST 2018
On 10/20/18 2:11 PM, Hans Lehmann wrote:
> Am 20.10.18 um 19:11 schrieb Benoît Minisini:
>> I don't understand what your problem is.
>> What does not work with 'Component.Load(<library absolute path>)'?
>> Benoît Minisini
> in the attachment the library and the program that should use the library.
> If I install the library in this path /home/hans/.local/share/gambas3/lib/gambasbook_de/mylibrary:0.0.gambas and select this
> library in the dialog (menu/project/properties.../libraries/Add) in the program, then everything works.
> But I want to use 'Component.Load(<library absolute path>)', which unfortunately doesn't work. What's the matter?
I also cannot get this to work.
When the library is added via the IDE menu, its name is "gambasbook_de/myLibrary" (note the capital "L"; though correcting that
in the code does not help).
I've tried as many path combinations I could think of including specifying a runtime library search path with relative paths and
also with just the name, "gambasbook_de/myLibrary". No luck.
I did notice that when the filename part of the path is "myLibrary:0.0.gambas", the error message states that it cannot load
component "myLibrary:0.0". If I specify the filename as "myLibrary:0.0", then the error message says it can't load component
"myLibrary:0". With a dot appended to the filename, ie. "myLibrary:0.0.gambas.", then it cannot load component
"myLibrary:0.0.gambas". Apparently, the trailing filename extension is being blindly stripped -- whatever import that may have.
More information about the User