Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Better Implementation?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Better Implementation?
Divers
Thread ID:
00005589
Message ID:
00005589
Vues:
80
I am using a series of forms to collect necessary information from users. The forms are called from procedures inside classes. These procedures are called from the init procedure of a class which has added the aforementioned classes to it.

e.g.

Define Class MyBigClass As Custom
Add Object oMySmallClass As SmallClass

Procedure Init
Do oMySmallClass.GetInfo
EndProc

In MySmallClass I gather several variables from the user using a form. Currently I use Public and Release to create a temprorary conduit between the form and the class.

Define MySmallClass As Custom
Info1 = ""
Info2 = ""
Info3 = ""

Procedure GetInfo
Public varInfo1, varInfo2, varInfo3
Do Form GetMyInfo
*The form gathers the variable information from fields
this.Info1 = varInfo1
this.Info2 = varInfo2
this.Info3 = varInfo3
Release varInfo1, varInfo2, varInfo3
EndProc
EndDefine

The purpose of this is to have a "base" set of information which will be passed on to subclasses and then changed within those subclasses. I also need the ability to revert the entire collection of subclasses back to the initial settings specified by the user. My question is whether this is the best way to obtain information from a form that is called from within a class. I hope this is a clear explanation. I look forward to any insights.

Thanks,
John Morrison
"Not everything that counts can be counted,
and not everything that can be counted counts"
-A. Einstein
Répondre
Fil
Voir

Click here to load this message in the networking platform