Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A FAQ on data objects and forms
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
A FAQ on data objects and forms
Divers
Thread ID:
00473275
Message ID:
00473275
Vues:
61
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform