[Gambas-user] Use of a Gambas library in a module
T Lee Davidson
t.lee.davidson at gmail.com
Tue Oct 23 15:03:30 CEST 2018
On 10/23/18 7:19 AM, Gianluigi wrote:
> Hi Benoit,
> have you tried the code in the 'Dynamic libraries' folder?
> Have you noticed that to load the library as a component just indicate the path "/usr/lib/gambas3/<library name>:0" but also
> "/foo/gambas3/<library name>:0" as indicated by Lee?
> Have you noticed that you don't need to load the library with the IDE dialog but just insert the library in the project?
> In fact it seems that if you load with the dialog then the code works less well (loading the combobox).
> As you noticed if you use 'Component.Load(<library absolute path>)' the library will not load.
> Best regards
To clarify for whomever it may concern...
With the library located in the project folder, yes, I have loaded it by specifying a path (with or without full or partial
<vendor> information) where it cannot be found, eg. "/<does-not-exist>/myLibrary".
When the library is added via the Project > Properties > Library dialog and its exported module is also loaded dynamically as a
class, it has an extra symbol, namely, just a dot, ".". This shows up in the ComboBox that is dynamically populated from the
symbols of the exported module that was loaded as a class (by the TestMat project in Gianluigi's 'Dynamic libraries' archive
attached in a previous message).
I just noticed that when a library that has no vendor specified is compiled into an executable, the copy that is automatically
installed is placed in "~/.local/share/gambas3/lib/(unknown)". I'm just curious if those parentheses are required because bash
does not like them, "bash: syntax error near unexpected token `('".
More information about the User