<html><head></head><body>I just wanted to remind of error handling and assumed a completely frozen UI is worse than the UI with only some components added, especially in a generic 'batch'.<br><br>I wasn't sure about your particular use case, so I added "maybe".<br><br><div class="gmail_quote">On 28 January 2020 11:28:30 am AEDT, zxq9 <zxq9@zxq9.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2020/01/28 9:22, Dmitry Belyaev wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Maybe<br><br>batch(Window, Fun) -><br>ok = wxWindow:freeze(Window),<br>try<br>Fun()<br>after -><br>ok = wxWindow:thaw(Window)<br>end.<br><br>would be better<br></blockquote><br>What would be better about that? If there is a problem in the GUI update <br>  (Fun()) the last thing I want to have happen is the Erlang half <br>sticking around.<br><br>-Craig<br></pre></blockquote></div><br>-- <br>Kind regards,<br>Dmitry Belyaev</body></html>