Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Postdelete/Predelete
Message
 
To
11/04/2005 14:16:42
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01003258
Message ID:
01003520
Views:
20
I looked at the code from the cListObjEdit.cmdDelete click method and at the bottom it calls this.parent.PostDeleteHook().
This is after the dialog has already asked do you want to delete yes or no which happens when thisform.delete() is called. Looks to me like no matter which way the user answers the postdeletehook will execute. Not the way I would have thought it should be. Or at least I need a way to know that the user said "NO" to the delete question from inside the postdeletehook.

I am trying to delete a file that is linked to a record in the grid that is shown on the form. I thought I could put the erase code in the postdeletehook but if the user changes their mind and says NO the code runs anyway and the file is deleted. I came up with a work around but it is not nearly as clean as if I could just use the postdeletehook. There is a test for the predeletehook and if it fails then the delete code does not run.
Previous
Reply
Map
View

Click here to load this message in the networking platform