Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Destroying an object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046886
Message ID:
00047272
Vues:
24
>>
>>Calling the destroy event of an object will do no harm to anything, but it will not destory the object either. The call will simply run any code in that method. Try putting up a form and then from teh command window call its destroy, nothing seems to happen unless you put code in the destroy, in that case your code runs but the fomr does NOT get destroyed. The destroy is an event method that is automatically fired durng the destruction of the object, it does not cause the destruction.
>
>Hi Jim,
>
>I presumed that whatever internal code does not get executed when you do NODEFAULT, would get executed when you manually call the event!
>
>Darrel
Darrel,

There is no automatic code assigned to the Destroy, the Destory simply gets called during the destruction of the object and IF you put code there it will run.

A common miscopnception is that the event method and the event are the same thing, they are not. Take, for example the Clcik of a command button. If you click the mouse of that button a few things happen, the button looks pushed, the button pops back out, the mouse down event method fires, the mouse up event method fire, the click event method fires. Now from another button call that button's click event method. The only thing that happens is the the cleick event method runs, none of the opther things happen because NO CLICK EVENT occured. The Event is the clicking of the mouse, the click event method runs when the mouser is clicked.

The release method will destroy an object, the destroy event method simply gets called during the destruction process. Programmatically calling the Destroy will NOT destroy the object, it will simply run the code in that method.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform