If you are positioned on the last line of the array, and you delete this line, then you always have to take care about oLbx:nAt because otherwise the bound error array occurs. To my opinion that should be checked in the class itself.
Error BASE/1132 Bound error: array access Args: (A:{ ... }) (N:-3)
Error BASE/1132 Bound error: array access Args: (A:{ ... }) (N:0)
Is this a similar issue?
Do we have a solution or update to TWBrowse Class or any suggestions that may resolve this issue?
driessen wrote:If you are positioned on the last line of the array, and you delete this line...
James Bott wrote:In the two examples you gave, N=-3 in one and N=0 in the other. I expect the problem is in your code. I'm not sure how you can get a -3 value for the row pointer. The 0 pointer probably means you have a empty array; either it was empty when the browse was initiated, or the user deleted all the records. Please check your code to make sure you are adjusting the array length value in the Browse (oLbx:nAt) when deleting and adding records. I don't know if wBrowse can handle an empty array or not--it should be easy to test.
driessen wrote:Hello,
If the value "oLbx:nAt" in a listbox, containing an array, gets a value which is higher then the length of the array, a bound array error occurs.
Is there no possibility to change the Twbrowse class in this way : when "oLbx:nAt" gets a value which is higher then the length of the array in the listbox, "oLbx:nAt" is automatically set to the length of the array. This would prevent the bound array error to occur.
My only problem : I know to little about classes to build this change.
Thank you very much in advance for any help.
If you are positioned on the last line of the array, and you delete this line, then you always have to take care about oLbx:nAt because otherwise the bound error array occurs. To my opinion that should be checked in the class itself.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Rick Lipkin and 71 guests