PDA

View Full Version : Views - Solution for a follow up window / 2 threads ?



jeanpaul.martins
01-26-2016, 06:36 AM
Hi,

Does Views provide with an easy solution to implement a follow up window during a long duration task ?
The follow up window should have a STOP button that the user can click on during the task, at any moment. Clicking on this button must stop the long duration task.
When we try to implement such a window it gets in background. We do not see it anymore.

How can Views help us implementing such a job ?
Is there any other solution than running two threads ?
How can we implement two threads in Views Application ?
What do you advice us ?

Best regards,
Jean-Paul MARTINS

cmartin
01-29-2016, 02:24 AM
Hello,
Alas there is no such capability in Views itself.

It seems you need to use 2 threads with a mutex protected variable.
The thread handling the computation will maintain the value of the variable (let's say between 0 and 100 with a specific value for the 'STOP' like -1)
The main thread, where Views is active, will be consulting it periodically.

The progress window needs to be modal to stay on top of the other windows.
Beware of not using a system modal window on MS Windows: all other windows will be blocked.

Claude