On Sun, Jan 25, 2009 at 01:32:57PM +0100, Kees Nuyt wrote: > The progress indicator of both REPLACE and SELECT can be > driven by the while { step() } loops in your program. > A progress callback is not of much use here, except for the > first step(), because the first step() returns after any > intermediate tables have been built. > > To get a % progress indicator you need a more or less > accurate estimate of what 100% is. You could gather some > statistics and keep that in a table, and/or assume worst > case every time.
All excellent advice, but a small nit, tiny really: you can still have some form of mildly useful progress indicator (a spinner, sand clock mouse sprite turning, whatever) when you don't know what 100% is. I say "mildly useful" because such indicators aren't useful when, say, the app gets stuck in an infinite loop, or the operation takes too long for the user to distinguish between "too long" and "infinite loop" :) Still, it's useful enough as described by the docs: " If the progress callback returns non-zero, the operation is interrupted. This feature can be used to implement a "Cancel" button on a GUI progress dialog box. " Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users