Created
February 28, 2023 17:15
-
-
Save MarkGoldberg/f9b2af3a2bc7963c695c3b1ec73d2c5a to your computer and use it in GitHub Desktop.
Clarion: Create Tag Buttons
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
MEMBER | |
MAP | |
END | |
INCLUDE('ctQLong.inc'),ONCE | |
NoError EQUATE(0) | |
ctQLong.CONSTRUCT PROCEDURE | |
CODE | |
SELF.Q &= NEW qtLong; CLEAR(SELF.Q) | |
SELF.BaseQ &= SELF.Q | |
!=============================================== | |
ctQLong.Add PROCEDURE(LONG xNewValue) | |
CODE | |
SELF.Q.ID = xNewValue | |
ADD(SELF.Q) | |
!=============================================== | |
ctQLong.AddUnique PROCEDURE(LONG xNewValue) | |
RetAdded BOOL(FALSE) | |
CODE | |
IF SELF.FindID(xNewValue) ! <> NoError | |
SELF.Add(xNewValue) | |
RetAdded = TRUE | |
END | |
RETURN RetAdded | |
!=============================================== | |
ctQLong.FindID PROCEDURE(LONG xValue) | |
CODE | |
SELF.Q.ID = xValue | |
GET(SELF.Q, SELF.Q.ID) | |
RETURN ERRORCODE() | |
!=============================================== | |
ctQLong.ToString PROCEDURE()!,STRING,DERIVED | |
CODE | |
RETURN PARENT.ToString() & ' ID[' & SELF.Q.ID &']' | |
!=============================================== | |
ctQLong.Del PROCEDURE(LONG xValue )!,BOOL,PROC !Returns TRUE when Deleted, FALSE when not found | |
FoundAndDeleted BOOL(FALSE) | |
CODE | |
IF SELF.FindID( xValue ) = NoError | |
SELF.Del() | |
FoundAndDeleted = TRUE | |
END | |
RETURN FoundAndDeleted |
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
! https://github.com/MarkGoldberg/CwUnit/blob/master/Libsrc/ctQueue.inc | |
INCLUDE('ctQueue.inc'),ONCE | |
qtLong QUEUE,TYPE | |
ID LONG | |
END | |
ctQLong CLASS(ctQueue),TYPE,MODULE('ctQLong.clw'),LINK('ctQLong.clw') | |
Q &qtLong | |
CONSTRUCT PROCEDURE | |
Add PROCEDURE(LONG xNewValue) | |
AddUnique PROCEDURE(LONG xNewValue),BOOL,PROC !Returns TRUE when added, FALSE when already existed | |
FindID PROCEDURE(LONG xValue ),LONG,PROC !Returns ErrorCode | |
Del PROCEDURE(LONG xValue ),BOOL,PROC !Returns TRUE when Deleted, FALSE when not found | |
ToString PROCEDURE(),STRING,DERIVED | |
END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment