Am I right in thinking that to read and assign each variable in a class, I have to write a subroutine to get and put? So in VB.NET I would do :
and in my main code I can do
dim lProduct as new objProduct
and then happily read and set the variables like
lProduct.XSL=0
etc.
But it doesn't seem to be the way Classes work in B4A. Just want to make sure I don;t do lots of extra work if I don't have too.
Thanks, Colin
B4X:
Public Class objProduct
Public SysProductId As String
Public SysSkuId As Integer
Public ProductNumber As String
Public ProductName As String
Public QuantityPerPack As Integer
Public UICSeed As Integer
Public LabelSize As Integer
Public Active As Integer
Public XSL As Integer
Public MSL As Integer
Public ROQ As Integer
Public Cost As Decimal
Sub initialize()
Clear()
end sub
Sub Clear()
SysProductId = ""
SysSkuId = -1
ProductNumber = ""
ProductName = ""
QuantityPerPack = 1
UICSeed = 100000
LabelSize = 0
Active = 1
XSL = 0
MSL = 0
ROQ = 0
Cost = 0
End Sub
End Class
and in my main code I can do
dim lProduct as new objProduct
and then happily read and set the variables like
lProduct.XSL=0
etc.
But it doesn't seem to be the way Classes work in B4A. Just want to make sure I don;t do lots of extra work if I don't have too.
Thanks, Colin