[Gambas-user] Modularity problem!

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Feb 2 18:57:16 CET 2009


Hi!
I'm converting vb6 project to gambas2.
In my project there are two modules (let's say example moduleA and
moduleB) that have different kind of basic functions and subs.
These functions are located in these modules by their category
(moduleA contains UI & message handling, and moduleB rest).
Then there are more modules (same way, functions by category) that
depends heavily on those functions from module A and B.

Now I am in this situation;
vb6 code example:

If SomeFunction(OtherFunction(Something), X, Y, YetAnOther) = False Then
...

Converted to Gambas2:
IF moduleB.SomeFunction(moduleA.OtherFunction(moduleB.Something()),
moduleB.X, moduleB.Y, moduleA.YetAnOther()) = FALSE THEN
...

As you can see, it's not pretty code and it's also slow to write.
I could use command WITH to make it little better, but still...
Or I could put all code into one big module, but there goes modularity
and good clear structure.

So, does Gambas have some kind of "#include" command like in C/C++, or
is there some kind of object oriented way to avoid this..?
Any tips&tricks appreciated!
Thanks!


Jussi




More information about the User mailing list