From 2e68593b3035d8ba842797d75cf164d88c490fec Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 10 Oct 2021 10:17:09 -0400 Subject: [PATCH] Move alert() to a Thread.invokeLater, as it is not in the main thread --- resources/TTSDeck.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/TTSDeck.js b/resources/TTSDeck.js index a9aacee..4a48114 100644 --- a/resources/TTSDeck.js +++ b/resources/TTSDeck.js @@ -100,7 +100,7 @@ function TTSDeckPage(busy_props, page_num, page_cards, copies_list) { deck_graphics.drawImage(card_image, col * card_image.width, row * card_image.height, null); } catch (ex) { - alert('Error while processing ' + card + ': ' + ex, true); + Thread.invokeLater(() => alert('Error while processing ' + card + ': ' + ex, true)); } } println("End of Row ", row);