Hi!
Since Try/Catch doesn't work with CallSub, is there a way to check if a method exists in a given class (instance)?
Edit: Solved!
Since Try/Catch doesn't work with CallSub, is there a way to check if a method exists in a given class (instance)?
Edit: Solved!
B4X:
Sub SafeCallSub(class As Object, method As String) As Object
If SubExists(class, method) Then Return CallSub(class, method)
Return Null
End Sub
Last edited: