*-- In the form Init: THIS.oBiz = NEWOBJECT ("MyBiz", "MyBiz") THIS.oBiz.oParent = THISFORM && Assume that the biz class have a public property called oParent *-- In the biz class: THIS.My_Property = THIS.oParent.My_Property && The form My_Property must be publicB) Pass the property to the biz class if it's read-only:
*-- In the form Init: THIS.oBiz = NEWOBJECT ("MyBiz", "MyBiz") THIS.oBiz.My_Property = THISFORM.My_Property && The biz class My_Property must be publicC) Pass a parameter object to the biz class:
*-- In the form Init: THIS.oBiz = NEWOBJECT ("MyBiz", "MyBiz") loParam = NEWOBJECT ("MyParam", "MyParam") loParam.My_Property = THISFORM.My_Property && The parameter class have a public property called My_Property THIS.oBiz.oParam = loParam && Assume that the biz class have a public property called oParam *-- In the biz class: THIS.My_Property = THIS.oParam.My_PropertyI prefer option C if you have many parameters to pass because everything is encapsulated inside one class. If you only have one parameter to pass and it's read-only, option B is good. Option A is the quick and dirty way to pass information, but it can also cause circular references and side effects if your not carefull.
>this.my_property = thisform.my_property >>