Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object Referencing and Form Releasing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00053143
Message ID:
00053279
Vues:
29
>I'm looking for an easy way for two textboxes to reference each other.
>Because of the nature of the form they are on it is ugly for them to try
>to reference using the common 'this.parent...' or 'this.form..' Instead I've
>been considering having a property on each of the textboxes called oRef. So,
>they could refer to each other by 'this.oRef.Value.' regardless of where in
>the form they appear. The obvious stumbling block to this is, of course, that
>a form that has any object references still intact won't release. I've tried
>to manually release the object reference in the destroy even of the textbox
>class, but the destory even doesn't even fire before the form hangs. Is there
>a better/easier way of doing this?

Michael, I haven't tested this (caveat emptor) but can you make 2 form properties with "thisform.....textbox1" in the first and "thisform....textbox2" in the second. Use these as 'prefixes' when referring to the textboxes.

In your form.QueryUnload method you would need to reset these properties to .Null.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform