Hi all,
today I quickly prepared a class wrapping the standard MediaView component. It seems to work, but I have a couple of questions for those who know JavaObiect better than me.
1. Is the below code for the OnError event right?
2. Can you provide an example when the OnError code should be triggered?
TIA
udg
today I quickly prepared a class wrapping the standard MediaView component. It seems to work, but I have a couple of questions for those who know JavaObiect better than me.
1. Is the below code for the OnError event right?
2. Can you provide an example when the OnError code should be triggered?
B4X:
'mp1 is the MediaPlayer object passed on class initialization
....
mv.InitializeNewInstance("javafx.scene.media.MediaView",Array As Object(mp1))
Dim e As Object = mv.CreateEvent("javafx.event.EventHandler","MVError",False)
mv.RunMethod("setOnError",Array(e))
...
End Sub
Sub MVError_Event(MethodName As String, Args() As Object) As Object 'ignore
If SubExists(CallBack,EventName&"_OnError") Then CallSub(CallBack,EventName & "_OnError")
Return True
End Sub
TIA
udg