Worker and SendProgeess()

Hello all!

Has anyone experience with the Worker’s SendProgress() method?
I call it in a method of a class that is used as the context of a XojoScript and the event JobProgressed never fires. Even not in a debug build when the worker is a thread.
None of Xojo examples uses SendProgress(). Does anyone use it successfully?

No one? :smiling_face_with_tear:

The worker is async and your xojoscript is not’

  1. so eighter you put the worker result into a property on the context class and call the xojoscript again
  2. or you make a blocking loop and wait for the result.
    First way is the best way, may also be the fastest.

Thanks DerkJ for the “async” hint! I’m experimenting with a script that runs in a separate thread and the worker has to wait for progress data… I will post an example when finished.

The script will still block even in a thread.
Try the examples, and test what you want to achieve.

I have a working example: Click to download via WeTransfer: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

1 Like