Name:
[771] David Fung
Member:
40 months
Authored:
3 videos
Description:
A programmer who enjoys programming. ...
Passing a parameter object to a form in Visual FoxPro [ID:186] (1/1)
in series: Visual FoxPro
video tutorial by David Fung, added 04/07
Name:
[771] David Fung
Member:
40 months
Authored:
3 videos
Description:
A programmer who enjoys programming. ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
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.
Uploaded on 11th April 2007, running time 4 minutes.
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 1625 (since July 30th)
- Plays in last week: 10
- Published: 41 months ago
Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
All comments excluding tick-boxed quick-comments
suberb
it is a good lesson
Very Informative
thanks, very helpful !
Many Thanks
very helpfull
i hope that all of your tutorials have a readable speech or code coz not all of the computer that people using havng a speaker of a head set..
It resolve my problem. Thanks
I appreciate your video. I wish more people will come to realize how powerfull FoxPro is.
Hi
It was very useful for me , appreciate your work
thank
I only came to watch the Jython video you had.
I was a little bored, good video.
Hi Anonymous of 24 Sep 2008, you may like to visit the following link for more information :)
is the visual foxpro will have a .net program? in the near future
Hi anonymous, you may like to look at VFPX:
http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX
David
can i make an animation using visual fox pro software
Hi Dan,
Yes the parameter object does not persist unless it is of global scope. One way to make it easier to create such an object is to write a utility function to return an instance of it, just remember to release it after use. Another way is to define a class of it so that there is no need to manually add the property every time.
Hope this helps :)
David
Great! Just used it in my app - I think its a more elegant way to accomplish passing a parameter with less code. I have a question - if I want to call the form again I need to create the object again and set loparam to a new value? It seems the object doesn't persist so that if I want to call the same form from another place I have to define the object again. Right? Thanks
Nice demo! Tried it and it works just fine!
Thanks
Anon-as you say, this is a really clear and nice screencast. I've never used VFPro so I can't comment on the content but I hope that David goes on to make some more videos.
David - you've clearly got knowledge to share, we'll welcome future content from you, especially as you are venturing into new areas for us.
Cheers,
Ian.
Hi
Great screencast, very useful when leaning visual foxpro.
