Component.Load (gb)

Static Function Load ( Name As String ) As Component

Loads a component from its name.

Name formats to use for components

Full path to a component or the name of a component installed into the Gambas3 default
component path.

Component name Examples:

Component.load("gb.eval")                                ' default location
Component.load("vendorname.componentName")               ' default location with vendor
Component.load("/home/myname/components/mycomp.gambas")  ' Anywhere else in the file system

Name formats used for libraries

The library name as a full path name and full version number or if installed to the local
gambas3 default locations just the library name and full version number. A leading : or /
is mandatory.

Library Name Examples:

Component.load(":libraryname:2.9")                       ' from the default Gambas3 locations
Component.load(":vendorname/libraryname:2.9")            ' from default gambas3 locations with vendor
Component.load("/home/myname/mylibs/libraryname:2.9.gambas")    ' Anywhere else in the file system

Notes

  1. Libraries require the full version number unlike the use directive which can partial match versions.

  2. In library naming use a / instead of a . to separate vendor from the library name.

See Also