I made a small interface for exporting PDF. I create two buttons, one for launching the export, one to stop it.
The launch button calls the exportPDF() function. This function sets two the values of the progressbar.
The problem is that once the export is launched, the cancel button is no more cliackable. I would like my users to have the opportunity to stop the export process.
I saw this thread but can't succeed in applying it.
The script is build like this :
win = new Window(...)
button export onClick > exportPDF();
It didn't look like the example had the ability to stop the script.
Anyway, i'm assuming that you are calling from a modeless panel, however the panel is locked because it is completing export function.
However it may be possible to create new panel with your cancel button, using the same targetengine, that can change the value of a variable checked in the createPDF loop.
Hi steven and thanks a lot for input.
I was starting feeling desperate to get a hint on that topic.
I tried your lead but it didn't do it. (I can assume I misused it however)
I create the window on clicking the green button. The cancel window appears fine but I am still unable to switch the button. It's frozen like any other interactrive elements.
That's ok, I am giving up this cancel button issue. It would be nice to get it but that's ok.
For the record :
onClick > Make new Window with cancel button and own interactive function
I wasn't any longer as the canceling window appears but still without interactivity.
Thanks a lot for trying to help me anyway.