main logo
Subject: Re: Compulsory Input on form
Author: Ed Leafe
Posted: 2001/11/05 20:55:47
 
View Entire Thread
New Search


<i><font color="#663300">Yup, you heard right. If you step through the code you can see that the first operation in the save() method is a call to the beforesave() method. If the Beforesave() returns true then the line of code that is acted on is RETURN .F., which kills the save operation.

IF BeforeSave()
RETURN .F.
ENDIF</font></i>

That is not true in the current version of the cBizobj class. The code reads:

<code>IF !This.BeforeSave()
RETURN FILE_CANCEL
ENDIF</code>

There is also a section shortly after that designed for hooking validation code, which reads almost identically:

<code>IF !This.BeforeSaveValidations()
RETURN FILE_CANCEL
ENDIF</code>

Returning .F. from either method will prevent the save from happening.
<font color="#cc0000"> ___/
/
__/
/
____/</font>
Ed Leafe
 
©2001 Ed Leafe
<-- Prior Message New Search Next Message -->