spikey wrote: Fri May 24, 2024 4:36 pm
Updating UI components from threads is not supported (but I can't find the original citation at the moment). It sometimes works but sometimes crashes on Windows and some Linux flavours, I understand it doesn't work on Macs.
I thought that was for the events, not for updating windows/gadgets.
Anyway, I would be more understanding of an error (IMA, or something, not a hang).
This does work:
Code: Select all
Procedure something(void)
Debug "About to resize"
ResizeWindow(0,490,319,#PB_Ignore,#PB_Ignore)
Debug "Resized 1"
EndProcedure
OpenWindow(0, 10, 10, 100, 20, "")
h=CreateThread( @something(), 0 )
Repeat : WaitWindowEvent(0) : Until IsThread(h)=#False
Debug "done"
But your saying I can't rely on this, so nothing can be updated in a window from a thread.
spikey wrote: Fri May 24, 2024 4:36 pm
If you've got more sophisticated updates then you might like to check out the module that mk-soft wrote at:
I'll have a look, thank you.