I am using the TEasyCurl class to do some FTP uploads. Is there a way for me to update the GUI of my program when I get the progress callback? This is what I have:
The window isn't redrawn and the progress bar appears full after the upload finishes - i.e. when I get back to my main loop that calls WaitEvent(). Adding PollEvent() to this not only didn't help (same behavior - no redrawing) but it actually seemed to cause random events to fire elsewhere in my code. Very strange.
Anyway, RedrawGadget seems to have no immediate effect - the documentation says it might not redraw the gadget immediately and I'm afraid that's the case at least on Linux. Is there a way to force a redraw? I guess this might be more appropriate in the GUI programming area... but it is a specific problem with libcurl because it makes it sort of hard to use in a GUI program if it isn't possible. Any ideas?
Function curlProgress:Int(data:Object, dltotal:Double, dlnow:Double, ultotal:Double, ulnow:Double) If ulnow <> 0 Then UpdateProgBar(TMainWindow.progPublish, ultotal / ulnow) RedrawGadget(TMainWindow.MainWindow) RedrawGadget(TMainWindow.progPublish) EndIf EndFunction
The window isn't redrawn and the progress bar appears full after the upload finishes - i.e. when I get back to my main loop that calls WaitEvent(). Adding PollEvent() to this not only didn't help (same behavior - no redrawing) but it actually seemed to cause random events to fire elsewhere in my code. Very strange.
Anyway, RedrawGadget seems to have no immediate effect - the documentation says it might not redraw the gadget immediately and I'm afraid that's the case at least on Linux. Is there a way to force a redraw? I guess this might be more appropriate in the GUI programming area... but it is a specific problem with libcurl because it makes it sort of hard to use in a GUI program if it isn't possible. Any ideas?