Get Blogged by JoKi

"The only frontiers are in your mind"
22 | 07 | 2017
Navigation
Syndication
Latest Tweets

Most Read Articles
Article Time Line
About me
Family guy, geek, entrepreneur, software craftsman: Visual FoxPro, C#, SQL Server, MySQL, Linux consultant, conference speaker

Certificates & Awards

Microsoft Certified Professional

Microsoft Specialist - Programming in HTML5 with JavaScript and CSS3 Specialist

Get in touch

Sharing is caring

Recent books


Sponsoring
If you like the information on these pages, your support is highly appreciated.
Thank you very much!
Affiliates

 

Spacer for layout formatting

Working with 'Parameter objects' instead of parameters

User Rating:★★★★★ / 1
PoorBest 
Development 04 June 2008 - 

Yesterday I stumbled over a good article in German language - Arbeiten mit Parameterobjekten - about using a parameter object rather than using parameters to pass information to functions and methods. As you know, I like this concept very much and actually already use it since years in my daily work. See also my other article on this: Kommentar zu 'Parameterobjekte'

Well, Tom uses blogger and because I don't have an account there I post my comments here in own 'blog space'. In his article Tom shows some code to transfer the value of the properties of the parameter object to the value properties of controls on the form. Well, I think that this could be way easier using the ControlSource property of the control directly. On the one hand the value is then bound to the parameter object and any changes are directly 'transferred' and on the other hand the concept saves you lots of code. Just configure the ControlSource of each control in the Property Window on the form and you are done. No extra code in Init or Destroy methods necessary.

[code]Text1.ControlSource = Thisform.oParameters.StartDatum[/code]

In case of an error change the value of Thisform.BindControls = .F. and one of your last lines in the form Init method is to set the value to .T.


Sincerely, JoKi

 


blog comments powered by Disqus
 
Spacer for layout formatting