The senior Clipper programmer here wanted me to ask someone this question.
I couldn't think of a better person to ask than you! :)
Question:
-------------

When a table's index file is re-opened (it was previously created), does it
have to evaluate the FOR clause, or can it wait to do that only when a value
in the table row changes?

In SIX, it does not check the FOR expression when it opens an index file.
In Harbour, when you open the index file it will evaluate the FOR
expression, and if any variables or functions in that expression are not
visible, the system will crash (undefined variable/function).

eg. Index on iif(x=3,"a","b") tag "temp" of test.cdx
When the index is opened (set index to...) if X is not visible, Harbour will
crash. In Clipper, it will only crash if a row in the table  changes value
and the index needs to be updated.

Unfortunately, my code has lots of specialized temporary indexes that are
created and then used within a specific function. This does not present a
problem until a timer event fires, which needs to close files to do
"something". Upon reopening those file before RETURNing back the original
function, the system crashes because the FOR in the index has variables out
of scope.

I can rewrite these but I will probably have to use Private variables and
non-Static functions.

Many thanks in advance

-- 
smu johnson <smujohn...@gmail.com>
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to