Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NEWOBJECT() Has no parent.
Message
De
26/06/2000 18:06:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00384767
Message ID:
00384823
Vues:
33
David,

What do you do about a class that's not a container class, and doesn't have an addobject method? I ran into a similar problem a while back - I created a sizing object which automatically handles resizing of any object which has a reference to it when it or it's container is resized. In order to do it, I had to pass the "parent" class' object reference to the resize object. To solve the dangling reference problem, I use the same name for this object in all my classes, and in all my base container classes, I created a "custom event" which triggers all the cotained classes to kill the autoresize object reference.

Sounds complicated, and it was, but now that it works in all my baseclasses, I never have to worry about it. Is there a better way to do that?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform