Information générale
Catégorie:
Programmation Orientée Object
Titre:
RemoveProperty method
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement