Posted by: Christoph Keimel
i am looking for help to realize something like java-interfaces in gupta
my goal is, to be able to switch instances of different classes (all
from the same base class).
i tried this solution (which fails):
1) it should be possible to define classes using the same interface later
so i start by defining the FcInterface with the function "String
which, on this level returns "Level: Interace"
2) next, i create another class "FcImplementation" which is derived from
FcInterface but it superimposes the function "String getLevel()" and
3) finally, i created a controller Class (FcController) with a Method
"String getlevel()". when this funktion is called it should use a specific
instance of another class to retrieve the result. the instance used needs
be set in another method "setImplementation( FcInterface )"
when i test this contruction (create an instance of FcImplementation; give
to FcController; call "getlevel()") the result is always given back by
FcInterface. It seems as though gupta always calls a method on the
of the variable declaration. please have a look at my interface_test.app.
am i overlooking something? has anyone tried something similar?
thanks for the help!
em software gmbh