Hi!
I'm trying to BROWSE a table that has several indexes. I made a "ON KEY LABEL ## DO" for it with a procedure that remembers current record position, checks for a field that the cursor is in, and if the table is indexed on this field, SET ORDER to it and then recover the position of the cursor. The problem is that while I can affect current record position in the table, the BROWSE window does not refresh until I move the cursor to the different line manually... and then it takes a previous or subsequent position according to the *old* order instead of new, throwing the table far from the area I want to browse.
A partial solution would be to issue SKIP immediately after reordering. It works, and even moves the cursor according to the new order, but when I try to combine it with a STEP -1 or SEEK/LOCATE to restore the exact position of the cursor, then refreshing of the BROWSE window works no more.
Thanks.
I'm trying to BROWSE a table that has several indexes. I made a "ON KEY LABEL ## DO" for it with a procedure that remembers current record position, checks for a field that the cursor is in, and if the table is indexed on this field, SET ORDER to it and then recover the position of the cursor. The problem is that while I can affect current record position in the table, the BROWSE window does not refresh until I move the cursor to the different line manually... and then it takes a previous or subsequent position according to the *old* order instead of new, throwing the table far from the area I want to browse.
A partial solution would be to issue SKIP immediately after reordering. It works, and even moves the cursor according to the new order, but when I try to combine it with a STEP -1 or SEEK/LOCATE to restore the exact position of the cursor, then refreshing of the BROWSE window works no more.
Thanks.