[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    [Gambas-user] Modularity problem!
From:       Jussi Lahtinen <jussi.lahtinen () gmail ! com>
Date:       2009-02-02 17:57:16
Message-ID: 384d3900902020957k2af1f1f4l7db9a306b39fff5b () mail ! gmail ! com
[Download RAW message or body]

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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic