Navigation:  Classes > bCheckColumn >

bCheckColumn:RecordList

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

List of the records for which the data value TRUE was set.

Class

bCheckColumn

Type

Access

Data Type

Array

Description

bCheckColumn:RecordList contains a list with all records for which the data value TRUE was set in the column. Records for which the data value FALSE was set are not contained in the list.

 

The list is an array whose number of elements is defined by the access bCheckColumn:CheckedCount. Each element of the array is a subarray with 2 elements. The subarray defines a block of records for which the data value TRUE was set. The subarrays have the following format:

 

Constant

Description

BCCB_STARTRECNO

The record number of the first record in the block.

BCCB_ENDRECNO

The record number of the last record in the block.

Samples

In the following sample all record blocks are determined for which the data value TRUE is set.

 

auBlock := oCheckColumn:RecordList

iBlockCount := ALen(auBlock)

FOR iBlock:=1 UPTO iBlockCount

       iBlockStart := auBlock[iBlock, BCCB_STARTRECNO]

       iBlockEnd := auBlock[iBlock, BCCB_ENDRECNO]

       ? "Record Block "+NTrim(iBlock)+":"

       ? "  "+NTrim(iBlockStart)+" - "+NTrim(iBlockEnd))

NEXT

 

In the following sample all records are determined for which the data value TRUE is set.

 

auBlock := oCheckColumn:RecordList

iBlockCount := ALen(auBlock)

FOR iBlock:=1 UPTO iBlockCount

       iRecStart := auBlock[iBlock, BCCB_STARTRECNO]

       iRecEnd := auBlock[iBlock, BCCB_ENDRECNO]

       FOR iRecNo := iRecStart UPTO iRecEnd

               ? iRecNo

       NEXT

NEXT

 

In the following sample the previous sample is used to implement the new access RecNoList in a inherited class myCheckColumn. With the access all RecNo can be determined for which the data value TRUE is set.

 

CLASS myCheckColumn INHERIT bCheckColumn

 

ACCESS RecNoList CLASS myBrowser

       LOCAL aiRecNo       AS ARRAY

       LOCAL auBlock       AS ARRAY

       LOCAL iBlockCount   AS DWORD

       LOCAL iBlock        AS DWORD

       LOCAL iRecStart     AS INT

       LOCAL iRecEnd       AS INT

       LOCAL iRecNo        AS INT

 

       aiRecNo := {}

       auBlock := self:RecordList

       iBlockCount := ALen(auBlock)

       FOR iBlock:=1 UPTO iBlockCount

               iRecStart := auBlock[iBlock, BCCB_STARTRECNO]

               iRecEnd := auBlock[iBlock, BCCB_ENDRECNO]

               FOR iRecNo := iRecStart UPTO iRecEnd

                       AADD(aiRecNo, iRecNo)

               NEXT

       NEXT

       RETURN aiRecNo

See Also

bCheckColumn:Check()

bCheckColumn:CheckAll()

bCheckColumn:CheckedCount

bCheckColumn:RecordDelete()

bCheckColumn:RecordGet()

bCheckColumn:RecordListClear()

bCheckColumn:RecordPut()

bCheckColumn:Uncheck()

bCheckColumn:UncheckAll()

 


Page url: http://www.YOURSERVER.com/index.html?bcheckcolumn_recordlist.htm