[Gambas-user] Using projects as libraries
Benoit Minisini
gambas at ...2...
Sat Jun 28 11:53:49 CEST 2003
Hello everybody,
I have just added the possibility of using projects as libraries on my own
box, and I wanted to have your opinion.
How does it work ?
I have added a new keyword, USE, to tell the interpreter to take classes into
another Gambas archive.
For example, let's suppose you have two gambas projects in the same directory.
-+--- MyProjects
|
+---Test
|
+---MyClasses
I want to use the classes of the MyClasses project in the Test project. To do
that, I just to add the following add in the Main() function of Test:
STATIC PUBLIC SUB Main()
USE "MyClasses"
...
END
Then, the Gambas intepreter will search a gambas archive with the name passed
to USE in the following directories:
1) In the same directory than where Test is stored.
2) If a directory with the good name is found in the same directory, then this
directory is search for a gambas archive (it is supposed to be a gambas
project).
3) In the component directory (/opt/gambas/lib by default). This way, we can
add global classes (such as an InputBox :-)) to every gambas project.
What do you think of that ?
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list