Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing Object References
Message
 
 
To
26/09/1996 18:35:29
Paul Watson
Mcv Global Systems, Inc.
Pasadena, California, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00008632
Message ID:
00008644
Views:
38
>> 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform