Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to link a class of validation methods to VCL field components?

Avatar of ttheimer
ttheimer asked on
Delphi
8 Comments1 Solution335 ViewsLast Modified:
I am refactoring a financial product.  I have a set of 6 fields that appear many times through the program (amount, start date, cost-of-living adjustment, etc).  sometimes these are individual edit components and sometimes they are columns in a grid.  As per usual all sets require the same basic set of validations and error responses.

I currently use functions to perform the validations.  I see some advantages to moving these functions into a class so that each field set is represented by an instance of the class.   But my question is how to best "link" or relate each of the fields - VCL edit components - to the class instance so that an onchange event in the editor would launch the appropriate validation method.

I get a bit fuzzy with class design when the properties are object references which is what would seem to be required here.  As stated above I am looking for a recommended means for linking field components to the class instance so that component events can trigger validation methods.  Please let me know if more details are needed regarding the nature of the problem.

Currently in Delphi 2007 but can upgrade if new features offer a better solution.

Thanks.

Tom
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert GFlag of Belgium imageOracle dba
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers