I have a class in which I want to be able to select a different type of media player depending on how the class is initialized. (I want to achieve Polymorphism).
Problem is, the Type has to be declared right up front, in the Class Globals.
If I try to say this:
I get this error:
I've tried a few different variations without success. Anyone have any thoughts on how to achieve this?
Problem is, the Type has to be declared right up front, in the Class Globals.
If I try to say this:
B4X:
If Player_Type = "Stream" Then
Public MP As MediaPlayerStream
else if Player_Type = "Local" Then
Public MP As MediaPlayer
End If
B4X:
Current declaration does not match the previous one