User Tools

Site Tools


validaterecord_a_virtual_to_validate_records_.htm
Navigation:  ABC Library Reference > FileDropClass > FileDropClass Methods >====== ValidateRecord (a virtual to validate records) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

ValidateRecord, VIRTUAL

blk2blue.jpg

The ValidateRecord method is a virtual called when the FileDropClass object fills its display QUEUE. ValidateRecord returns a value indicating whether to include the current record in the displayed list. Thus ValidateRecord provides a filtering mechanism in addition to the ViewManager.SetFilter method. Valid return values include:

  Record:OK includes the record
  Record:OutOfRange excludes the record
  Record:Filtered excludes the record

Implementation:

The ResetQueue method calls the ValidateRecord method. The ValidateRecord method calls the PARENT.ValidateRecord method (ViewManager.ValidateRecord).

Return value EQUATEs are declared in \LIBSRC\ABFILE.EQU:

Record:OK          EQUATE(0)  !Record passes range and filter

Record:OutOfRange  EQUATE(1)  !Record fails range test

Record:Filtered    EQUATE(2)  !Record fails filter tests

Return Data Type:     BYTE

Example:

MyFileDropClass.ResetQueue PROCEDURE

i LONG

 CODE

 SETCURSOR(CURSOR:Wait)

FREE(SELF.ListQueue)

SELF.ApplyRange

SELF.Reset

LOOP UNTIL SELF.Next()

 IF SELF.ValidateRecord()=Record:OK      !Validate Records

  SELF.SetQueueRecord

  ADD(SELF.ListQueue)

  ASSERT(~ERRORCODE())

  IF SELF.UpdateFields.Equal()

   i=RECORDS(SELF.ListQueue)

  END

 END

END

!procedure code

See Also:     ResetQueue, ViewManager.SetFilter, ViewManager.ValidateRecord

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