Kbase P92005: How to know if disableFields in the SDV is invoked because of a CANCEL operation
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  01/09/2004 |
|
Status: Unverified
GOAL:
How to know if disableFields in the SDV is invoked because of a CANCEL operation
GOAL:
How to know if disableFields in the SDV is invoked because of the CANCEL button in the smartToolBar has been pressed
FACT(s) (Environment):
Progress 9.x
FIX:
When you press the CANCEL button, the cancelRecord procedure is called in the SDV. This causes the disableFields to be executed.
You can override both these procedures by setting a flag in the first procedure and checking it in the second.
In the Definitions section:
DEFINE VARIABLE myFlag AS LOGICAL NO-UNDO.
CancelRecord procedure override:
/* Code placed here will execute PRIOR to standard behavior. */
myFlag = YES.
RUN SUPER.
/* Code placed here will execute AFTER standard behavior. */
myFlag = NO.
END PROCEDURE.
DisableFields procedure override:
DEFINE INPUT PARAMETER pcFieldType AS CHARACTER NO-UNDO.
/* Code placed here will execute PRIOR to standard behavior. */
IF myFlag THEN
MESSAGE 'we are coming from CANCEL'
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE 'we are NOT coming from CANCEL'
VIEW-AS ALERT-BOX INFO BUTTONS OK.
RUN SUPER( INPUT pcFieldType).
/* Code placed here will execute AFTER standard behavior. */
END PROCEDURE.