Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RemoveObject does it at will
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00871699
Message ID:
00871833
Vues:
33
This message has been marked as the solution to the initial question of the thread.
Kamil,

Is the container a class where these 3 internal objects are defined? If so you'll see this "pseudo" removal. You can't actually remove the object from the "definition" of the class in memory and that is where VFP is getting the information it is displaying in your vartype() output.

But the object is really removed from the runtime instance. As is illustrated by trying:

? type( "this.command3.caption" )

If you want to have vartype() return different results after RemoveObject() you can use runtime composition using AddObject() to add the controls.

>
>With This &&(container)
>.RemoveObject('Label2')
>.RemoveObject('Command3')
>.RemoveObject('Command4')
>* doing something irrelevent to Command3/4
>?VarType(.Command3)+VarType(.Command4)+VarType(.Label2) - displays OOU
>EndWith
>
>Changing to VarType(This.Command3) doesn't help
>if i put VarType(.Command4.Tag)
>"Unknown element" error message.
>
>...scratching the back of the head
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform