Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get rid of a child object in a class at runtime
Message
De
13/08/2002 09:23:30
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00688718
Message ID:
00689085
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
>Hi,
>
>I have a framework container class which hosts another object as a child. I would like to replace the child object with my own. The problem is, my object should have the same name as the original object, so the code in the container class that references the child object is not broken.
>
>I know that I can't remove or rename the child object in design mode, so I wanted to do that at runtime. Does anyone see a chance to get rid or to rename the original object at runtime?

After having read the whole thread... I think I may have something:

- subclass the container
- add oObject_access method to the container, like this:
if type("this.oReplacement.name")#"C"
   this.addobject( --- add your new object here)
endif
return this.oReplacement
The whole idea is to redirect anything that mentions the object you want removed, to the cuckoo's egg you want to show up instead.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform