Hey, gang:
I wrote earlier about letting the user sequence items arbitrarily. (For those who were following along, I opted to allow the user to shift records up and down in the sequence. It's a very small table with probably never more than 10-12 records being affected.)
My current problem is the behavior of the browse after the switch. I'll post the code since it's so short:
main = Table.Get("xProcess")
join = Table.Get("xProcessJoin")
seq = join.Sequence
rno = join.recno()
join.fetch_prev()
seq2 = join.sequence
join.change_begin()
join.sequence = seq
join.change_end()
join.fetch_goto(rno)
join.change_begin()
join.sequence = seq2
join.change_end()
parentform.Resynch()
'processstep.Refresh_Browse()
The problem is that at the end of the script the browse highlight bar is gone. I'd like to keep that on so the user can track the item he's moving around.
The more serious problem is that the browse cursor stays on the same row, even though the record has moved. So:
=== Apples
=== Bananas
==> Canteloupe
If I shift up Canteloupe, the shift occurs, but the browse cursor stays on row 3:
=== Apples
=== Canteloupe
==> Bananas
Even though the underlying table is actually pointing at "Canteloupe" still. Things just get weirder from there.
If I add the commented out refresh, the browse resets itself to the first record. Ick. That means the user has to keep re-clicking on the same object for every move.
I see places to find out the current record for a browse, but no way to set it.
Can it be done? I have the record number, I just want the browse to show the pointer correctly and highlight the row.
I wrote earlier about letting the user sequence items arbitrarily. (For those who were following along, I opted to allow the user to shift records up and down in the sequence. It's a very small table with probably never more than 10-12 records being affected.)
My current problem is the behavior of the browse after the switch. I'll post the code since it's so short:
main = Table.Get("xProcess")
join = Table.Get("xProcessJoin")
seq = join.Sequence
rno = join.recno()
join.fetch_prev()
seq2 = join.sequence
join.change_begin()
join.sequence = seq
join.change_end()
join.fetch_goto(rno)
join.change_begin()
join.sequence = seq2
join.change_end()
parentform.Resynch()
'processstep.Refresh_Browse()
The problem is that at the end of the script the browse highlight bar is gone. I'd like to keep that on so the user can track the item he's moving around.
The more serious problem is that the browse cursor stays on the same row, even though the record has moved. So:
=== Apples
=== Bananas
==> Canteloupe
If I shift up Canteloupe, the shift occurs, but the browse cursor stays on row 3:
=== Apples
=== Canteloupe
==> Bananas
Even though the underlying table is actually pointing at "Canteloupe" still. Things just get weirder from there.
If I add the commented out refresh, the browse resets itself to the first record. Ick. That means the user has to keep re-clicking on the same object for every move.
I see places to find out the current record for a browse, but no way to set it.
Can it be done? I have the record number, I just want the browse to show the pointer correctly and highlight the row.
Comment