Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INDEX ON (displaying progress)
Message
From
09/07/2010 02:04:53
 
 
To
08/07/2010 23:42:37
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01471425
Message ID:
01471960
Views:
55
>>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform