Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing internal object references.
Message
 
To
06/10/1998 13:13:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144275
Message ID:
00144439
Views:
17
I had more or less the same problem: in one baseclass form I had references to all grids, to automate cascading updates/deletes, reference to the first control in the form and so on. After a while the form became much too complex for maintenance. I have solved the problem by storing the full name of the objects I want to reference to variables or arrays and then working with the objects using eval() ie:

ThisForm.ReferencedGrid = "ThisForm.Pgf.Page1.Grd1"
with eval(ThisForm.ReferencedGrid)
.SetFocus()
for n = 1 to .ColumnCount
...
...
next
endwith

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform