User Tools

Site Tools


takecompleted_a_virtual_to_complete_an_update_form_.htm
Navigation:  ABC Library Reference > WindowManager > WindowManager Methods >====== TakeCompleted (a virtual to complete an update form) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

TakeCompleted, VIRTUAL, PROC

blk2blue.jpg

The TakeCompleted method processes the EVENT:Completed event for the window and returns a value indicating whether window ACCEPT loop processing is complete and should stop.

TakeCompleted implements the default processing when the end user accepts an update form (presses the OK button). The actual process depends on the value of various WindowManager properties, including Request, InsertAction, VCRRequest, etc.

TakeCompleted returns Level:Benign to indicate processing of this event should continue normally; it returns Level:Notify to indicate processing is completed for this event and the ACCEPT loop should CYCLE; it returns Level:Fatal to indicate the event could not be processed and the ACCEPT loop should BREAK.

Implementation:

The TakeCompleted method calls the SaveHistory method, then completes the requested action (insert, change, or delete), subject to various validation constraints. That is the FileManager object validates form fields and does concurrency checking, and the RelationManager object enforces any referential constraints.

TakeCompleted sets the Response property and POSTs an EVENT:CloseWindow when appropriate.

Return values are declared in ABERROR.INC.

The TakeEvent method calls the TakeCompleted method.

Return Data Type:     BYTE

Example:

MyWindowManager.TakeEvent PROCEDURE

Rval BYTE(Level:Benign)

I    USHORT,AUTO

 CODE

 IF ~FIELD()

  RVal = SELF.TakeWindowEvent()

  IF RVal THEN RETURN RVal.

 END

 CASE EVENT()

  OF EVENT:Accepted;RVal = SELF.TakeAccepted()

  OF EVENT:Rejected;RVal = SELF.TakeRejected()

  OF EVENT:Selected;RVal = SELF.TakeSelected()

  OF EVENT:NewSelection;RVal = SELF.TakeNewSelection()

  OF EVENT:Completed;RVal = SELF.TakeCompleted()

  OF EVENT:CloseWindow OROF EVENT:CloseDown

   RVal = SELF.TakeCloseEvent()

 END

 IF RVal THEN RETURN RVal.

 IF FIELD()

  RVal = SELF.TakeFieldEvent()

 END

 RETURN RVal

See Also:     InsertAction, Request, Response, TakeEvent, VCRRequest

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