loading a module inside a module

Hello,

I know modules in modules are not supported. Can anyone explain why?

I have this idea/problem: I have quite a few global methods that do standard stuff, for example for navigation, a dialog showing log entries and so forth. The downside is that I cannot use those methods in my modules. So I sit here and copy global methods between solution/modules. And I really wouldn’t like to change one of these…

So my idea is this: I create a module that contains this kind of “global logic”. This module can be added as a module to other modules, so I have access to its methods.

The result, of course, is this: all my modules have this module attached and so does the main solution. So Servoy would have to make sure that it doesn’t get confused :lol:

Is this possible/thinkable of?

Thanks
Patrick

Sounds like subclassing to me. Which is wonderful !
Ofcourse you don’t want your submodule to be duplicated x times into your solution just because other modules also use the same submodule. My guess is this is where the difficulty lies for Servoy.

In any case you have my vote for this one :)

Please add my vote for this one. :D

This problem arises because Servoy is not truly object-oriented (OO).
OO languages/systems have 3 main features:

  • inheritance
  • polymorphism
  • encapsulation

In Servoy you cannot create objects having these features.

I think modules are simply born to permit multiple developers. Using them to build a kind of OO framework could work for very simple things but not in general…

As I said in other posts I think Servoy is a great tool, but it lacks of OO features. And this is the main problem!
I requested OO in the past and in these months it seems to me a lot of us asked for something like this, even if not ever called (or realized it is) OO.