Name: [771] David Fung
Member: 87 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

(Showmedo is undergoing major changes. To report any problems viewing the videos please email us and include browser and OS specifics. Cheers - Kyran.)

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: 2912 (since July 30th)
  • Plays in last week: 0
  • Published: 88 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.

Your email address will not be published.

Show some quick comments >>








All comments excluding tick-boxed quick-comments

suberb


it is a good lesson


18. Saifuddin Sat, 20 Feb 2010 01:48

Very Informative


17. Jim Toler Fri, 12 Feb 2010 06:30

thanks, very helpful !


16. anonymous Tue, 29 Dec 2009 07:33

Many Thanks


15. anonymous Fri, 21 Aug 2009 16:37

very helpfull


14. anonymous Mon, 29 Jun 2009 23:03

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..


13. anonymous Thu, 18 Jun 2009 05:10

It resolve my problem. Thanks


12. anonymous Sat, 06 Jun 2009 20:59

I appreciate your video. I wish more people will come to realize how powerfull FoxPro is.


11. anonymous Sat, 28 Mar 2009 17:05

Hi

It was very useful for me , appreciate your work

thank


10. anonymous Thu, 01 Jan 2009 20:11

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 :)

http://fox.wikis.com/wc.dll?Wiki~ShouldVFPBecomeDotNet~VFP


8. anonymous Wed, 24 Sep 2008 10:59

is the visual foxpro will have a .net program? in the near future


6. anonymous Wed, 26 Dec 2007 00:03

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


3. anonymous Mon, 07 May 2007 15:18

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.


Showmedo is a peer-produced video-tutorials and screencasts site for free and open-source software (FOSS)- with the exception of some club videos, the large majority are free to watch and download.

how to help » about » faq »

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education and documentation are relatively neglected in the Open-source world. Coders love to code, and explaining how best to use or improve the software tends to be deferred or even sidelined.

At Showmedo we believe the community can play a vital role here and also say thanks for the tools and software that make our lives easier. If you have a piece of software you love or a programming langugage you are enthusiastic about, why not make a screencast showing others how to use it? All the stuff you wish you'd been told, the tips, tricks, insights that would have saved you time and frustration.

Screencasting is easier than you think, and we're happy to help you. You can emailus for advice or just use some of the how-to screencasts on the site. This screencasting learning-pathis a good place to start.

Kudos and Thanks for David

Related Videos

Recommended Videos

Content

Feedback

Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.

feedback@showmedo.com