User Tools

Site Tools


ask_add_a_record_to_the_lookup_file_.htm
Navigation:  ABC Library Reference > FileDropComboClass > FileDropComboClass Methods >====== Ask (add a record to the lookup file) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Ask, VIRTUAL, PROTECTED

blk2blue.jpg

The Ask method adds a new record to the filedrop's lookup file and returns a value indicating its success or failure. If it succeeds it returns Level:Benign, otherwise it returns the severity level of the last error it encountered while trying to add the record. See Error Class for more information on severity levels.

Implementation:

The TakeEvent method calls the Ask method. Return value EQUATEs are declared in ABERROR.INC (see Error Class for more information):

Level:Benign                  EQUATE(0)

Level:User                    EQUATE(1)

Level:Program                 EQUATE(2)

Level:Fatal                   EQUATE(3)

Level:Cancel                  EQUATE(4)

Level:Notify                  EQUATE(5)

Return Data Type:     BYTE

Example:

MyFileDropComboClass.TakeEvent PROCEDURE

UserStr     CSTRING(256),AUTO

 CODE

!procedure code

IF SELF.Ask() = Level:Benign      !update lookup file

 SELF.UpdateFields.AssignLeftToRight

 SELF.Close

 SELF.ResetQueue

 SELF.ListField{PROP:Selected} = SELF.GetQueueMatch(UserStr)

 DISPLAY(SELF.ListField)

END

!procedure code

SeeAlso:     TakeEvent

ask_add_a_record_to_the_lookup_file_.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1