I have a class SWO with property ID.
I also have a class OrderLines with properties SKU and Text.
I want to have OrderLines be a property of SWO.
For a resultant set of:
What would be the best way of going about this?
Senior QA Analyst
what programming language?
It's TestPartner...so VB
You need to do something like this. In class SWO add an "Orderlines" property like this:
' Declare a class-level instance of object Orderlines
Private m_oOrderLines As Orderlines
Public Property Get Orderlines() As Orderlines
Set Orderlines = m_oOrderLines
Public Property Let Orderlines(ByVal oNewValue As Orderlines)
Set m_oOrderLines = oNewValue
Then in your script/module, declare an SWO object as usual:
Dim oSWO As SWO
Set oSWO = New SWO
You will now be able to now refer to properties oSWO.Orderlines.SKU and oSWO.Orderlines.Text
I tried that. While it lets me access the properties, they are only read only. I would like them to be read/write.
Try use SET in property for Write option