Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A FAQ on data objects and forms
Message
From
06/02/2001 21:53:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
A FAQ on data objects and forms
Miscellaneous
Thread ID:
00473275
Message ID:
00473275
Views:
60
I'm at the beginner stage of dealing with data objects.
I'm using the object library written by Barry Brittenham as a template, which creates a data object in a class that accepts the name of the database and table as parameters with the statement in the GetData procedure:

SCATTER NAME oRecord

In the form class LOAD:

SET PROCEDURE MyLibrary ADDITIVE

The ControlSource property of the text controls is set at runtime in the form class INIT:

WITH THIS
.TxtFirstName.ControlSource = cDataObj + cFldFName
ENDWITH

The value for the constants cDataObj and cFldFName is set in an .h file:

#DEFINE cDataObj "THISFORM.oPatient.oRecord"
#DEFINE cFldFName "Last_Name"

where 'Last_Name' is the actual name of the field in the table.

My Question: is this a []good []poor []totally unrecommended way of assigning ControlSource and other properties to controls? What I've read so far on the UT and VFUG and FP Advisor has been a bit abstract. Any ideas or FAQs on the subject would be enormously appreciated.

Kindest regards,
Robin
Next
Reply
Map
View

Click here to load this message in the networking platform