Hello,
I have a strange problem in a wbrowse.
This is a part of the code :
SET KEY VK_DELETE TO tDelete
...............
REDEFINE LISTBOX oLbx ID 101 OF oDlg FIELDS "","","","" .......
oLbx:bLine := {||{Fld1,Fld2,Fld3,Fld4,...}}
...............
REDEFIN BUTTON ID 901 OF oDlg ACTION tDelete()
...............
STATIC PROCEDURE tDELETE
// This procedure performs the delete-function of the choosen line in the wbrowse.So I have defined the Delete-button of my keyboard as the button which performs tDelete().
If the focus is on the last line of the wbrowse and I click with my mouse on the "DELETE" button in my dialog box, everything is happening as it should be : the last line of my wbrowse is deleted and my wbrowse is updated and refreshed.
But if the focus still is on the last line of the wbrowse and I push the Delete-button of my keyboard, I always get a "Bound error: Array access", refering to the line of the oLbx:bLine.
Why does it work if a pushbutton in the dialogbox is used and why doesn't it worked if a linked key on my keyboard is used, although it performs exactly the same procedure ?
I also noticed that, if I click on any line but the last line and I go back to the last line to delete it, both possibilities for deletion perform without any error.
Thanks a lot in advance.
Regards,
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773