DacPagedDatastore might crash with a runtime error when used in a
quickbrowse when scrolling up under certain circumstances.
Case 1: QBROWSE1 sample from the source\samples\basics\qbrowse folder:
- Start sample
- press CTRL-PGDN
- hold UP key pressed
- "Error in array index" occurs
Case 2: QBROWSE2 sample from the source\samples\basics\qbrowse folder:
- Start sample
- a) Type in number 22 (pointer moves to last row, and only
last row is displayed)
b) Move about half page down, select 1st wisible row,
- Maximize window
- Try to move up (with scroll bar, wheel, keyborad ...)
"Error in array index" occurs
|
Problem has been solved. Download the fix here. This issue does not
exist in future versions.
If this is not applicable, try the following:
As a workaround, use this class instead of the built in DacPagedDatastore
class:
#define WA4634
#ifdef WA4634
// overloaded PDS class to fix PDR 4634
CLASS MyDacPagedDatastore FROM DacPagedDatastore
EXPORTED:
INLINE METHOD ScrollRowBuffer( nDirection )
LOCAL nRow := ::aRowData[::nCurrRow][1]
LOCAL xRet := ::dacPagedDatastore:ScrollRowBuffer( nDirection )
LOCAL oCurrentConsumer := ::oConsumer
IF ::nCurrRow == 0
::nCurrRow := nRow + nDirection
::oConsumer := NIL
::refresh()
::oConsumer := oCurrentConsumer
ENDIF
RETURN xRet
ENDCLASS
#endif
|