[Gambas-user] Dynamically loading components
Sebi Kul
sebikul at ...626...
Wed May 11 00:43:10 CEST 2011
Hi!
I am using Gambas 3 to develop a modular application. I would like to
know if it's possible to load components dynamically (If the component
file exist, load it, if not, skip the execution code where the
component's functions are called)
What I have so far is this:
==========
Try Component.Load("daily-school-online.gambas")
If Component.IsLoaded("daily-school-online.gambas") Then
OnlineModuleLoaded = True
Endif
=========
But for this to work, I have to add the component as a library on the
projects setting dialog, meaning that if the file does not exist, the
program wont start. I also have the problem that if I don't add the
component as a library, the project wont compile, as the parser will
find functions that don't exist on this project, but are declared on the
component.
Does anybody have any ideas on how to achieve this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xC5D113F0.asc
Type: application/pgp-keys
Size: 1711 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110510/118ee386/attachment.key>
More information about the User
mailing list