With the codes below, EditBox is shown after Activate Window, thus index progress is not real-time. With too many files and too many records, display will be blank for a long time before EditBox is shown.
My intention is to show the editbox and update display after every file is indexed. How do I do it?
I thought of transferring all indexing codes below the Activate Window command and adding a .show, such as this:function Reindex()
DECLARE WINDOW MainForm
DEFINE WINDOW fmReindex ;
AT 10, 10 ;
WIDTH 336 ;
HEIGHT 310 ;
TITLE "Reindexing Files" ;
MODAL
@ 10, 10 EDITBOX ebRein ;
PARENT fmReindex ;
WIDTH 300 ;
HEIGHT 300 ;
VALUE "Reindexing files..." + CRLF ;
READONLY
ON KEY ESCAPE OF fmReindex ACTION fmReindex.Release
END WINDOW
// indexing codes are here
use file1
index on field1 to file1
fmReindex.ebRein.Value := fmReindex.ebRein.Value + "File1..." + CRLF
use file2
index on field2 to file2
fmReindex.ebRein.Value := fmReindex.ebRein.Value + "File2..." + CRLF
// other files are indexed here...
CENTER WINDOW fmReindex
ACTIVATE WINDOW fmReindex
return NIL
but I get an error: Control: ebRein of fmReindex not defined. Program terminated....
CENTER WINDOW fmReindex
ACTIVATE WINDOW fmReindex
use file1
index on field1 to file1
fmReindex.ebRein.Value := fmReindex.ebRein.Value + "File1..." + CRLF
fmReindex.ebRein.show
...
Any ideas?