Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RemoveProperty method
Message
De
11/04/2000 16:40:51
Fabian Valencia
Calamos Asset Managment Inc.
Naperville, Illinois, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
RemoveProperty method
Divers
Thread ID:
00358343
Message ID:
00358343
Vues:
60
I have this type of situation going on in a program right now :

o=CREATEOBJECT('MyObject')
o.AddProperty( 'nVar1', 10 )
o.AddProperty( 'cVar3', 'Hello' )
lResult = o.MyMethod()

o=CREATEOBJECT('MyObject')
o.AddProperty( 'nVar1', 25 )
o.AddProperty( 'cVar2', 'Good Bye' )
lResult = o.MyMethod()

For performance reasons, I don't like performing the CREATEOBJECT line over and over, but I don't know any other way to remove all the added properties.

In the second call to o.MyMethod, the property cVar3 must not exist anymore.

Seems like a RemoveProperty method would work, if i only had one.

Does anyone have any ideas, on how to get this object back to it original state without having to recreate it?

Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform