Hi,
----- Original Message -----
From: Robert Skowronek(o2)
To: Harbour Project Main Developer List.
Sent: Wednesday, January 13, 2010 3:35 PM
Subject: [Harbour] ACHOICE, Bound error: array access
Hi,
I got following error when I return AC_REDRAW in user function for ACHOICE()
after
one item had been added to acItems. To be much puzzling when I remove item
from the list it is working fine.
Error BASE/1132 Bound error: array access
Called from ACH_LIMITS(0)
Called from ACHOICE(0)
By the way it used to work in Clipper without any trouble but it fails in
Harbour environment.
Kindly advice.
Best regards
Robert
Litle sample to demonstrate differences between
Clipper 5.2e (Correct) and Harbour 2.0.0 (Error)
----------------------------
#include 'achoice.ch'
#include 'inkey.ch'
PROCEDURE MAIN
MEMVAR aPoz
PRIVATE aPoz
aPoz := {'Item 1','Item 2'}
CLEAR SCREEN
ACHOICE(5,5,15,15,aPoz,NIL,"AChFun")
CLEAR SCREEN
Inkey(0)
RETURN
FUNCTION AChFun(nMode,nCurr,nPos)
LOCAL retval,nLast
MEMVAR aPoz
nLast:=LASTKEY()
DO CASE
CASE nLast == K_F5
AADD(aPoz,'Item '+STR(LEN(aPoz),2)) // Add item to table
retval:=AC_REDRAW // Redraw list - ERROR
CASE nLast == K_ESC
retval:=AC_ABORT
OTHERWISE
retval:=AC_CONT
ENDCASE
RETURN retval
--------------------------------
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour