Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing internal object references.
Message
From
06/10/1998 23:54:00
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144275
Message ID:
00144450
Views:
20
>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

Yeah, I thought of that too (actually remembered this solution from a thread here long ago) but this reference is used in so many methods, I would rather just code an ugly release than EVAL() the name in a dozen dfferent places. Thanks for your input.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform