Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Release causing error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01035234
Message ID:
01035612
Vues:
15
Hi Chad, thanks for the clarification!

>David,
>
>You can't release properties of objects with the RELEASE command. Setting the property to null as you have done will release the object (assuming nothing else is holding a reference to it). So, what you have below is correct. Just delete the line that you have commented out.
>
>HTH,
>Chad
>
>>Hi all, I define a class below to do some basic directory management. The release line in the destroy method does not compile. Any idea? Thanks!
>>
>>define class CDir as custom
>>   hidden sDir
>>   hidden oShell
>>   sDir= ""
>>   oShell= .null.
>>   function init
>>      this.sDir= sys(5)+sys(2003)
>>      this.oShell= createobject('WScript.Shell')
>>   function destroy
>>      cd (this.sDir)
>>      && release this.oshell && Error: must be a variable or array
>>      this.oShell= .null.
>>   function MyDocuments
>>      cd (this.oShell.SpecialFolders("MyDocuments"))
>>enddef
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform