Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uptrimDeadNodes is pruning my port #241
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
No more signals. |
evancz
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bmatcuk commentedMay 9, 2015
A while back (I think in Elm 0.13?), I wrote something like this:
I have some native javascript that determines a URL based on user input, and then feeds that URL into Elm via
soundUrl.updateTrackthen takes that and begins streaming the audio (by calling out to an Elm library I was working on to add support for the Web Audio API - so, eventually it ends up in native JS again to create an audio element, set the src, and start playing).streamis never actually used for anything, it's just a placeholder since I can't haveupdateTrack <~ soundUrlby itself...This no longer works because
trimDeadNodesis removing the signal created by the port from theinputs. When my native JS sets the soundUrl, it's callingnotifyon the runtime, which is looping through the inputs and firing off the signals, but becausetrimDeadNodesremoved the port earlier, nothing happens...updateTrackis never called.Is that intended behavior? Have I made a noob mistake? Is there a way to accomplish this that will make
trimDeadNodeshappy? Or is this a bug?