Hi,

I'm not familar with programming and it is often hard for me to distinguish between LUA core functions and darkable LUA API. You have to look at LUA docs as well [0].

Am 2017-01-30 12:34, schrieb René Seindal:
On 2017-01-30 12:28, Tobias Ellinghaus wrote:
Am Montag, 30. Januar 2017, 12:04:03 CET schrieb René Seindal:
Hi

[...]

I have put in a progress bar (background job) but the progress bar
doesn't update and the cancel button doesn't work, because I can't
find a way to hand off control to the gui to update, while looping
through the images, looking stuff up in the other sqlite3 database.

From your script
progress.percent = total / count

The API [1] says the value should be between 0 and 1. So I think this should look like:
progress.percent = count / total

I think it is not enough to break the loop. Also you need to set the job.valid to false to cancel it, like the script which Tobias mentioned.

Christian

[0] https://www.lua.org/manual/5.3/
[1] https://www.darktable.org/lua-api/ar01s02s30.html.php
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to [email protected]

Reply via email to