The BO question for delete "Are You Sure you want to Delete this Record?" happens before the BeforeDelete(). Acutally the BeforeDelete() should be allowed to do all it's validations and messages and only if cleared by the BeforeDelete() should the question "Are You Sure you want to Delete this Record?" I feel it can be frustrating to the unsuspecting user.
For eg. I have a BeforeDelete() check like below:
<code> LOCAL llRetVal
llRetVal = DODEFAULT()
IF lNoDelete = MESSAGEBOX("Cannot Delete default records")
RETURN .F. ENDIF
RETURN llRetVal </code>
What I feel is that when the user selects File | Delete the first thing he should see is "Cannot Delete default records", etc. and the control should return to the form. If the criteria is met then the "Are You Sure you want to Delete this Record?" question is to be popped.
This same, though there may not be any messages, can apply to Before*() functions.
Ed, I appreciate your efforts for CB and I am just letting you know about my observations (3 or 4 digests full of them) and would not want to monopolize the product or preferences or efforts. The above, all my previous posts and even the future ones may seem trivial and irritating but are in good faith. CB is a fine product and does a lot many things that either I would have to reinvent or pay a handsome sum for. So pluheessee, pluheessee don't boot me out from the community <g>. Regards Bhavbhuti ©2002 Bhavbhuti Nathwani |