On Wednesday, September 21, 2016 at 2:09:30 AM UTC-3, Brian Cardiff wrote:
>
> Hi,
>
> In elm 0.17.1, is it possible to send a message to the app from a spawned
> process? If so, How? :-)
>
> Some days ago I failed to do that. I wanted to implement a debounce
> module. The rough idea was that from a message I want to debounce a spawned
> process would start. First it will do a sleep and then it should message
> the app.
>
> Spawning the process is required so in the next message of the user, the
> previous "setTimeout" process can be killed. The Process.Id is needed.
>
> I was forced to take a different approach. Basically, filtering the
> outdated "setTimeouts". But I would really like to change that.
>
> In case you want to see more source, the package is:
> http://package.elm-lang.org/packages/bcardiff/elm-debounce/latest/Debounce .
> And the spawn branch is as far as I got: spawning the process, getting the
> Id, but unable to receive a message after the sleep.
>
> Thanks in advance,
>
For sure any feedback is welcome. If other approach should/could have been
taken to debounce events I am all ears, well ... eyes.
> --
> Brian J. Cardiff - Manas Technology Solutions
> [ar.phone] 4796.0232 #BCR(227)
> [us.phone] 312.612.1050 #BCR(227)
> [email] bcard...@manas.com.ar
> [web] www.manas.com.ar
> [weblog] http://weblogs.manas.com.ar/bcardiff/
>
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.