Thread-safety of ALERT and CONFIRM?

I understand that you can not call any commands that invoke the user interface from a pre-emptive thread.

Then why are commands such as ALERT and CONFIRM marked as thread-safe in the documentation?

So you don’t know that http://forums.4d.com/Post/FR/15391225/0/0/those commands should not be used>… :twisted: :wink:

Then why are commands such as ALERT and CONFIRM marked as thread-safe in the documentation?

That’s 4D magic :slight_smile:

Or if you do not believe in magic, it is 4D friendliness.

Our VP of R&D thought that ALERT and CONFIRM is often used for debugging or internal error reporting. To do cross process communication in debugging is not helping the job.
So he decided to help you. Stopping the preemptive process, calling internally the main coop process and let that execute the command, transfer the answer, resume the preemptive process. Both commands do not allow the developer to run code inside or use other variables, so workload would be reasonable.
Nice guy.

I personally was quite happy about that idea and used it in the beginning often enough debugging compiled code. When I write new code, I now normally use ASSERT as replacement for debug messages. I can either let 4D display them, or fetch them and just write in a log in a global way, without touching each method. And ASSERT is also preemptive ready.

“You could but you shouldn’t” is always better that “You can’t but you want to” :wink: