Skip to main content
1 of 6
Kuba
  • 137.7k
  • 13
  • 289
  • 751

Sometimes we need to help Dynamics to realize that they are out of date, FinishDynamic[] serves that purpose.

This works well:

If[
   x === k, 
   display = "Correct"; FinishDynamic[]; Pause[1];  display = rand
]
Kuba
  • 137.7k
  • 13
  • 289
  • 751