>>>>Hi Gang!
>>>>
>>>>In one of our apps, there is some code to do an
>>>>
>>>>INDEX ON
>>>>
>>>>to recreate the tags in the free table.
>>>>
>>>>
>>>>The output is displayed on the form, but looks very uncontrolled... writing over text and objects.
>>>>
>>>>
>>>>I have added an editbox to show output before we reach this point in the program.
>>>>
>>>>Any way to redirect the output of INDEX ON to go into the editbox, instead of the form itself?
>>>>
>>>>Thanks!
>>>
>>>the first raw idea ...
>>>
>>>PUBLIC g_LastRefresh
>>>g_LastRefresh = CAST(NULL AS N)
>>>
>>>CREATE CURSOR testindex (f1 INT)
>>>FOR k=1 TO 1000000
>>> APPEND BLANK
>>>NEXT
>>>GO TOP
>>>
>>>INDEX on f1 FOR progressIndex() TAG tag1
>>>
>>>* DISABLE OUTPUT
>>>g_LastRefresh = -1
>>>
>>>PROCEDURE progressIndex
>>> IF m.g_LastRefresh<0 OR EMPTY(RECCOUNT())
>>> RETURN
>>> ENDIF
>>> IF m.g_LastRefresh<ROUND(RECNO()/RECCOUNT(),2)
>>> WAIT WINDOWS ROUND(RECNO()/RECCOUNT(),2) NOWAIT
>>> ENDIF
>>> g_LastRefresh=ROUND(RECNO()/RECCOUNT(),2)
>>>ENDPROC
>>>
>>>
>>
>>Thanks!
>
>As Fabio said, this will cost you Rushmore Optimization!
Plus a wait window for every second new record added.