Created
November 27, 2013 13:43
-
-
Save MarkGoldberg/7675892 to your computer and use it in GitHub Desktop.
ViewManager.Next (Clarion ABC) refactoring for clarity
This helps explain return values from .ValidateRecord()
ViewManager.Next is One Method from ABBrowse.clw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ViewManager.Next PROCEDURE | |
CODE | |
LOOP | |
NEXT(SELF.View) | |
CASE ERRORCODE() | |
OF NoError ; CASE SELF.ValidateRecord() | |
OF Record:OK ; RETURN Level:Benign | |
OF Record:OutOfRange; RETURN Level:Notify | |
! OF Record:Filtered ; do nothing loop around for the NEXT() | |
END | |
OF BadRecErr; RETURN Level:Notify | |
ELSE ; SELF.Primary.Me.Throw(Msg:AbortReading) | |
RETURN Level:Fatal | |
END | |
END | |
!!Below is the shipping version | |
! 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment