We can pass info to and retrieve info from a form like this:
DO FORM WITH arg1,arg2 TO result
which is similar to calling a function:
result = FORM(arg1,arg2)
When I am developing a form, I often need to change the number of input and output arguments, which means I need to constantly adjust the form calling interface.
By using a parameter object as an input/output mechanism simplifies it like below:
local loParam
loParam = createobject('empty')
addproperty(loParam,'input',"input_value")
addproperty(loParam,'output')
do form with loParam
? loParam.output
Also the use of parameter object makes it flexible in when and where to assign the output value, i.e. not restricted to RETURNing a single entity in the UNLOAD event of the form.
If How to use Parameter Object to a form in Visual FoxPro is your video, and you believe it's here without your consent,
please refer to our DMCA policy.