I have made a framework, where I can plug in GUI components by creating them as classes with a certain interface. Normally, I would do this using Implements, so that they would all appear to be the same class, but that option is not available in B4A.
So, in my case, I have a bunch of different GUI components (in the framework terminology called SCR). These are different, but they all share some common properties and methods.
So, for example, I want to do this:
I know that SCR has a HostPanel property, which has a Visible property, but the compiler doesn't and reports an error.
How do I solve this, without true object oriented interfaces? For methods, it's easy to simply use CallSub (at least as long as they don't have many arguments), but properties?
So, in my case, I have a bunch of different GUI components (in the framework terminology called SCR). These are different, but they all share some common properties and methods.
So, for example, I want to do this:
B4X:
Sub ShowSCR(SCR As Object)
SCR.HostPanel.Visible = True
End Sub
I know that SCR has a HostPanel property, which has a Visible property, but the compiler doesn't and reports an error.
How do I solve this, without true object oriented interfaces? For methods, it's easy to simply use CallSub (at least as long as they don't have many arguments), but properties?