Posted by: Christoph Keimel
hi everyone,
i am looking for help to realize something like java-interfaces in gupta
3.1.
my goal is, to be able to switch instances of different classes (all
dervied
from the same base class).
i tried this solution (which fails):
1) it should be possible to define classes using the same interface later
on,
so i start by defining the FcInterface with the function "String
getLevel()"
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
returns
"Level: Implementation"
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
to
be set in another method "setImplementation( FcInterface )"
when i test this contruction (create an instance of FcImplementation; give
it
to FcController; call "getlevel()") the result is always given back by
FcInterface. It seems as though gupta always calls a method on the
class-level
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!
regards,
christoph keimel
--
em software gmbh
Attachment: interface_test.app