I want to switch from non-async to async version of a NativeMessageBox::showYesNo but need to pause program flow until I get a result (yes, no) from it. Any tip on how to do a wait/pause?
Pausing/waiting for the result would negate the purpose of using the async methods. The result of the async messagebox is delivered via the callback function, so you need to provide that to the messagebox show method.
Yes, I understand how it works, and probably not explained well what I want to achieve.
I’m loading some files in a for loop. When a file is missing I want to stop and give a user choice to find that missing file and then continue loading the rest. It’s easy with a modal non-async messagebox, but I want to move to async methods.
Btw, something is changed in a 6.1 and now modal messagebox return wrong results, 0 for Yes and 1 for No ?!
Best practice would be that you make the file loading loop into an async process, so that the message manager can handle the GUI events you will need for the message box, etc… if you need help thinking about how to do that, I would be glad to help.
Thanks for the idea