Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Destroying an object
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00046886
Message ID:
00047358
Views:
26
>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.

Hi Jim,

It is unfortunate that MS chose to use the command NODEFAULT, if as you say there is no "automatic code " associated to the event. It is far to close to the command DoDefault() which explictly requests code from the base class to be run. NODEFAULT infers that the internal code in the base class method will be prevented from being called.

Do you know of any existing documentation that explains what behaviour is associated to events? The VFP documentation only really explains when the event methods are fired.

Darrel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform