User Tools

Site Tools


getactionallowed_validate_a_requested_formvcr_action_.htm
Navigation:  ABC Library Reference > FormVCRClass > FormVCRClass Methods >====== GetActionAllowed (validate a requested FormVCR action) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

GetActionAllowed( event, action ), VIRTUAL

blk2blue.jpg

GetActionAllowed Checks for a valid FormVCR action.

The GetActionAllowed method is a virtual method used to validate a FormVCR action.

Implementation:

The GetActionAllowed method is called by the TakeEvent method and is used to synchronize toolbar buttons with the appropriate FormVCR action..

Example:

 CASE ACCEPTED()

 OF SELF.VCRRequest

  IF SELF.GetActionAllowed(EVENT:Accepted,SELF.Window.Request) THEN

   CHANGE(SELF.VCRRequest,SELF.Window.Request)

   SELF.Window.OriginalRequest = SELF.Window.Request

   SELF.TakeRequestChanged(SELF.VCRPrevRequest,SELF.Window.Request)

   SELF.VCRPrevRequest = SELF.Window.Request

  ELSE

   IF SELF.NoRecords THEN

    SELF.NoRecords = RECORDS(SELF.View)

    IF NOT SELF.GetActionAllowed(EVENT:Accepted,SELF.Window.Request) THEN

     SELF.Window.Request = SELF.VCRPrevRequest

     CHANGE(SELF.VCRRequest,SELF.Window.Request)

     SELF.UpdateWindow

    ELSE

     CHANGE(SELF.VCRRequest,SELF.Window.Request)

     SELF.Window.OriginalRequest = SELF.Window.Request

     SELF.TakeRequestChanged(SELF.VCRPrevRequest,SELF.Window.Request)

     SELF.VCRPrevRequest = SELF.Window.Request

    END

   END

  END

 END

getactionallowed_validate_a_requested_formvcr_action_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1