Navigation: ABC Library Reference > BrowseClass > BrowseClass Methods >====== AskRecord (edit-in-place selected browse item) ====== | |
AskRecord( request ), VIRTUAL, PROC
AskRecord | Does edit-in-place update of the selected browse record. |
request | A numeric constant, variable, EQUATE, or expression that indicates the requested edit-in-place action. Valid edit-in-place actions are Insert, Change, and Delete. |
The AskRecord method does edit-in-place updates for the selected browse row and column, then returns a value indicating whether the requested edit was completed or cancelled.
The AddEditControl method specifies a custom EditClass for a specific browse column.
Implementation:
The AskRecord method assumes the UpdateViewRecord method has been called to ensure correct record buffer contents.
AskRecord should be followed by the ResetFromAsk method.
The Ask method calls the AskRecord method.
Return value EQUATEs are declared in \LIBSRC\ABFILE.EQU:
RequestCompleted EQUATE (1) !Update Completed
RequestCancelled EQUATE (2) !Update Aborted
EQUATEs for request are declared in \LIBSRC\ABFILE.EQU:
InsertRecord EQUATE (1) !Add a record to table
ChangeRecord EQUATE (2) !Change the current record
DeleteRecord EQUATE (3) !Delete the current record
Return Data Type: BYTE
Example:
BrowseClass.Ask PROCEDURE(BYTE Req)
Response BYTE
CODE
LOOP
SELF.Window.VCRRequest = VCR:None
IF KEYCODE() = MouseRightUp
SETKEYCODE(0)
END
IF SELF.AskProcedure
IF Req=InsertRecord THEN
IF SELF.PrimeRecord()
RETURN RequestCancelled
END
END
Response = SELF.Window.Run(SELF.AskProcedure,Req)
SELF.ResetFromAsk(Req,Response)
ELSE
Response = SELF.AskRecord(Req)
END
UNTIL SELF.Window.VCRRequest = VCR:None
RETURN Response
See Also: AddEditControl, Ask, ResetFromAsk