Hi guys,
I have some Activities that share one or more functions. In this wy I realize a sort of polymorphism.
But, the following code seems not to work...
Is there any way to obtain what I need ? Thanks in advance
I have some Activities that share one or more functions. In this wy I realize a sort of polymorphism.
But, the following code seems not to work...
B4X:
' Activity_A
sub Fooo (A as string, B as string)
'...
end sub
' Activity_B
sub Fooo (A as string, B as string)
'...
end sub
' Activity_C
sub Fooo (A as string, B as string)
'...
end sub
' This is a CLASS in wich I will choose the activity to load
Sub Class_Globals
Dim MyAct as Object
' ...
end sub
' ...
sub OpenActivity (ActName as string,ParA as string,ParB as string)
select case ActName
case "A"
MyAct=Activity_A
case "B"
MyAct=Activity_B
case "C"
MyAct=Activity_C
case else
return
end select
' These callsub is not fired !!!
callsub3(MyAct,"Fooo",ParA,ParB)
end sub
Is there any way to obtain what I need ? Thanks in advance