Navigation: ABC Library Reference > FileDropComboClass > FileDropComboClass Methods >====== Ask (add a record to the lookup file) ====== | |
Ask, VIRTUAL, PROTECTED
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