Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error event does no return to master
Message
De
10/01/2013 13:22:57
 
 
À
09/01/2013 15:45:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01561811
Message ID:
01562048
Vues:
48
>>
>>clear
>>clear all
>>loForm		= null
>>loForm		= NewObject('myForm')
>>? loForm, Vartype(loForm)
>>
>>define class myForm as Form
>>	function init() as Boolean
>>		return .f.
>>	endfunc
>>enddefine
>>
>
>That may be the case in your example, but after releasing a form - loForm.release() - the object variable will still be an object variable. However, it will be a NULL.


Yes. You'll have to use an explicit "RELEASE loForm" to get it to go away at that level.

I have found another interesting quirk about the way VFP loads objects built with the GUI, or from a class definition in the GUI, or from a class definition in a source file. The object, though released, remains as a ghost object. Its members are visible in the debugger, but they are inaccessible. Took me a while to track down the cause of that condition, and find the workarounds.

See this thread on foxite: http://www.foxite.com/archives/object-has-inaccessible-memberssolved-0000365532.htm

This particular message has the code to reproduce the condition. It will trap to the debugger and you can examine the variable as indicated in the comment right above the stopped source code line: http://www.foxite.com/archives/object-has-inaccessible-memberssolved-0000365538.htm
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform