Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing internal object references.
Message
De
06/10/1998 23:54:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00144275
Message ID:
00144450
Vues:
21
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform