User Tools

Site Tools


validaterecord_validate_an_element_.htm
Navigation:  ABC Library Reference > ViewManager > ViewManager Methods >====== ValidateRecord (validate an element) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

ValidateRecord, VIRTUAL

blk2blue.jpg

The ValidateRecord method validates the current VIEW element and returns a value indicating whether or not the data is valid. A return value of zero (0) indicates the item is valid; any other value indicates the item is invalid.

Implementation:

The ValidateRecord is a virtual placeholder for derived class methods.

The Next and Previous methods call the ValidateRecord method.

Return values are declared in ABFILE.INC as follows:

ITEMIZE(0),PRE(Record)

OK         EQUATE    !Record passes range and filter

OutOfRange EQUATE    ! Record fails range test

Filtered   EQUATE    ! Record fails filter tests

END

Return Data Type:     BYTE

Example:

ViewManager.Next PROCEDURE

 CODE

LOOP

 NEXT(SELF.View)

 IF ERRORCODE()

  IF ERRORCODE() = BadRecErr

   RETURN Level:Notify

  ELSE

   SELF.Primary.Me.Throw(Msg:AbortReading)

   RETURN Level:Fatal

  END

 ELSE

  CASE SELF.ValidateRecord()

  OF Record:OK

   RETURN Level:Benign

  OF Record:OutOfRange

   RETURN Level:Notify

  END

 END

END

See Also:     Next, Previous

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