>this.my_property = thisform.my_property >>
Public oForm oForm = Createobject('myUIClass','Customer') oForm.Show() Define Class myUIClass As Form table_name = '' Add Object btnCheck As CommandButton With Caption='Check' Procedure Init(tcTableName) This.table_name = m.tcTableName This.AddObject('myBiz','myBiz') This.AddObject('myDa','myDa') Endproc Procedure btnCheck.Click TEXT TO m.lcInfo TEXTMERGE noshow Form.Table_Name:<<thisform.table_Name>> Biz Table_Name:<<thisform.myBiz.table_Name>> Biz Name:<<thisform.myBiz.BizName>> Da table_name:<<thisform.myDa.Table_Name>> Da bizName:<<thisform.myDa.BizName>> ENDTEXT Messagebox(m.lcInfo) Thisform.myDa.FillPropertiesFromBiz(Thisform.myBiz) TEXT TO m.lcInfo TEXTMERGE noshow Form.Table_Name:<<thisform.table_Name>> Biz Table_Name:<<thisform.myBiz.table_Name>> Biz Name:<<thisform.myBiz.BizName>> Da table_name:<<thisform.myDa.Table_Name>> Da bizName:<<thisform.myDa.BizName>> ENDTEXT Messagebox(m.lcInfo) Endproc Enddefine Define Class myBiz As Custom table_name = '' BIZName = '' Procedure Init This.BIZName = Sys(2015) This.table_name = Thisform.table_name Endproc Procedure ReadUIProperties This.table_name = Thisform.table_name Endproc Enddefine Define Class myDa As Custom table_name = '' BIZName = '' Procedure Init This.table_name = Thisform.table_name Endproc Procedure FillPropertiesFromBiz(oBiz) This.table_name = oBiz.table_name This.BIZName = oBiz.BIZName Endproc EnddefineOr if the BIZ and DA were drag&dropped it'd look like:
Define Class myUIClass As Form table_name = '' Add Object myBiz As myBiz Add Object myDa As myDa Add Object btnCheck As CommandButton With Caption='Check' Procedure Init(tcTableName) This.table_name = m.tcTableName This.myBiz.ReadUIProperties() This.myDa.FillPropertiesFromBiz(This.myBiz) Endproc Procedure btnCheck.Click TEXT TO m.lcInfo TEXTMERGE noshow Form.Table_Name:<<thisform.table_Name>> Biz Table_Name:<<thisform.myBiz.table_Name>> Biz Name:<<thisform.myBiz.BizName>> Da table_name:<<thisform.myDa.Table_Name>> Da bizName:<<thisform.myDa.BizName>> ENDTEXT Messagebox(m.lcInfo) Endproc EnddefineIOW even the first object that's initting has access to outermost object properties (form).