diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 968f21d65b..af51c4a506 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-10 20:23 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/achoice.prg + ! fixed typo in one of recent modifications which caused RTE in + ac_test.prg + ! fixed yet another typo which removed nMode setting + ! fixed to not execute user procedure when no item is active at + startup. This problem was visible in ac_test2.prg + 2010-02-10 15:53 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/procaddr.c ! added missing #include "hbvm.h" diff --git a/harbour/src/rtl/achoice.prg b/harbour/src/rtl/achoice.prg index 27f52903e4..8a9942ab0a 100644 --- a/harbour/src/rtl/achoice.prg +++ b/harbour/src/rtl/achoice.prg @@ -111,7 +111,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo DispPage( acItems, alSelect, nTop, nLeft, nRight, nNumRows, nPos, nAtTop, nItems, nItems ) - lFinished := Empty( acItems ) + lFinished := nMode == AC_NOITEM DO WHILE !lFinished IF nMode != AC_GOTO .AND. nMode != AC_NOITEM @@ -619,7 +619,7 @@ STATIC FUNCTION Ach_Limits( nFrstItem, nLastItem, nItems, alSelect, acItems ) nItems++ IF Ach_Select( alSelect, nCntr ) IF nFrstItem == 0 - nFrstItem := nLastItem := 1 + nFrstItem := nLastItem := nCntr ELSE nLastItem := nItems ENDIF @@ -632,6 +632,8 @@ STATIC FUNCTION Ach_Limits( nFrstItem, nLastItem, nItems, alSelect, acItems ) IF nFrstItem == 0 nMode := AC_NOITEM nLastItem := nItems + ELSE + nMode := AC_IDLE ENDIF RETURN nMode