ADD OBJECT can now resolve multi-level object references. In order to properly compile such references, you have to wrap them into quotes like in the following example:
loFrm = CreateObject("frmSample")
loFrm.show(1)
Define Class frmSample as Form
Add Object cnt as container
Add Object "cnt.cmd" as commandbutton
Procedure cnt.cmd.Click
MessageBox("Click")
EndProc
EndDefine
This adds a container with a button control. While Visual FoxPro can compile this code, you can only execute it in Guineu.
No comments:
Post a Comment