If I have
how would I write a sub to do something like
Is there a way to check if an object is one of my types?
I can't find anything like typeof
regards, Ricky
B4X:
Type tFare(TableID Int, FareDate As Long, AddingNew As Boolean)
Type tShift(TableID Int, ShiftDate As Long, AddingNew As Boolean
how would I write a sub to do something like
B4X:
Sub Save(obj As Object, addingnew As Boolean
If typeof(obj)=typeof(tFare) Then
'add or edit the Fare
Dim f as tFare
f = obj
Msgbox(f.TableID,"")
Else If typeof(obj)=typeof(tShift) Then
'add or edit the Shift
End If
End Sub
Is there a way to check if an object is one of my types?
I can't find anything like typeof
regards, Ricky