I would *LOVE* to see classes implemented in B4P!! That would give a more oop flavor to development. I would imagine something like this...
Well, what do you think???
B4X:
Public Class Classname
'Declare methods and properties here
Public Method Methodname(arglist...)
Private Input Output Property Propertyname1(arg)
Public Input Output Property Propertyname2(arg)
End Class
Public Sub ClassInitialize
End Sub
Public Sub ClassDispose
End Sub
Public Sub Methodname(arglist...)
End Sub
Private Sub Propertyname1(arg)
' No need for class-scoped variables -- use properties for true oop
Static p1
If isInput(arg) Then
p1 = arg
End If
Return p1
End Sub
Public Sub Propertyname2(arg)
Static p1
' How to 'self reference'
If isInput(arg) Then
p1 = p1 + .Propertyname1
End If
Return p1
End Sub
Well, what do you think???