Re: Using callbacks within LC and JS

2017-05-31 Thread Jonathan Lynch via use-livecode
Yah - setting up threads that include JS event listeners was a big pain for Augmented Earth - I have no suggestions for simplifying that part. That bit of complexity seems unavoidable to me. Sent from my iPhone > On May 31, 2017, at 9:15 AM, hh via use-livecode > wrote: > > Sadly this is on

Re: Using callbacks within LC and JS

2017-05-31 Thread hh via use-livecode
Sadly this is only valid if the js jobs you do are non-threaded and do not use workers, rather than being a matter of logic. But the speed gain by using javascript in the browser is often only due to multi-threading. We don't have always control about all parts of a js library. We can't "split" t

Using callbacks within LC and JS

2017-05-31 Thread Jonathan Lynch via use-livecode
This is in response to a different thread, but worth discussing on its own. I just wanted to explain my view on why callbacks are not as horrible as they seem at first, if one structures the script logically. The below code explains: On LCcontrolScript pcommand,pdata If pcommand = empty then P