General information
Title:
A FAQ on data objects and forms
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only