Ask (update selected browse item)

Top  Previous  Next


Ask( request ), VIRTUAL, PROC


Updates the selected browse record.


A numeric constant, variable, EQUATE, or expression that indicates the requested update action. Valid actions are Insert, Change, and Delete.

The Ask method updates the selected browse record and returns a value indicating whether the requested update was completed or cancelled.


Depending on the value of the AskProcedure property, the Ask method either calls the WindowManager.Run method to execute a specific update procedure, or it calls the AskRecord method to do an edit-in-place update.

The TakeEvent method calls the Ask method. The Ask method assumes the UpdateViewRecord method has been called to ensure correct record buffer contents.

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


BrowseClass.TakeEvent PROCEDURE

!procedure data


!procedure code


OF SELF.DeleteControl


 SELF.Ask(DeleteRecord)           !delete a browse item

OF SELF.ChangeControl


 SELF.Ask(ChangeRecord)           !change a browse item

OF SELF.InsertControl


 SELF.Ask(InsertRecord)           !insert a browse item

OF SELF.SelectControl

 SELF.Window.Response = RequestCompleted





See Also:     AskProcedure, AskRecord, TakeEvent