Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing Object References
Message
 
 
À
26/09/1996 18:35:29
Paul Watson
Mcv Global Systems, Inc.
Pasadena, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00008632
Message ID:
00008644
Vues:
37
>> The text box objects already exist on the form. I want to store references to them in the array ,,,

Oops... no sooner did I post that I realized that I misread the question (even though you said it twice!).

If you know the names of those object references (i.e., textboxes) that you want to put into the array, just do something like:

cTemp="ThisForm.SomeTextbox"
aControl(i)=Eval(cTemp) --> puts the reference into the array

If there are a bunch of references, a quick and dirty way, for example, within the form's init:

#Define CONTROLREFS "ThisForm.SomeTextBox/ThisForm.AnotherTextBox/ThisForm.Page1.YetAnotherTextBox" (and on and on)

Then, in your code:
cControlsToStore= ChrTran(CONTROLREFS, "/", chr(13))
For i=1 to MemLine(cControlsToStore)
aControl(i)=Eval(MLine(cControlsToStore,i))
EndFor
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform