Web vs Native (was Re: HTML5 limitations?)

Trevor DeVore lists at mangomultimedia.com
Fri Jul 28 13:05:32 EDT 2017


On Fri, Jul 28, 2017 at 11:43 AM, Mark Waddingham via use-livecode <
use-livecode at lists.runrev.com> wrote:

>
> At the end of the day, it might not be that making it synchronous *is* the
> solution, but instead tweaking engine syntax and semantics to make it
> easier to deal with this asynchronicity.
>
> e.g.
>
> on mouseUp
>   async do "..." as javascript into tVar
>   -- implicit wait until tVar has been set
>   put tVar into field 1
> end mouseUp
>
> Note, this is just pseudo-code for the idea. The hardest part about doing
> the callback thing is that it splits up the critical sequence of actions
> you are trying to code into lots of bits separated by cruft (the handler
> definitions). This reduces readability, and maintainability which is
> something we really don't want. i.e. The problem you are trying to solve is
> obfuscated by the technical baggage needed to solve it.
>

To me this is the crux of the issue. Callbacks make the logic more
difficult to follow. Imagine a ui that requires three calls to a web
service before it can display part of the UI. There are three callbacks
that occur. Being able to keep all of the logic in one handler and have the
engine deal with the necessary wait until the async response is received
(or the operation is canceled) would be wonderful.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list