[elm-discuss] Polymorphic components
Hello, I'm new to Elm and stuck with a problem. In my model I have a list of components of different types. Now I'm trying to get the view and update functions right. This has surely already been solved, but I didn't find a solution anywhere... Minimal example: https://ellie-app.com/qsQjTYcs2va1/3 Uncomment line 166 to see what I mean. I would need to "cast" ComponentMessage and -Model to their Int subtypes. What did I get wrong? Sincerely, Steffen -- 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.
Re: [elm-discuss] Community version of the elm guide gitbook?
On Friday, February 17, 2017 at 4:59:48 PM UTC, Peter Damoc wrote: > > Is it elm-tutorial by any chance? > https://www.elm-tutorial.org/en/01-foundations/06-type-aliases.html > That's the one thanks. -- 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.
Re: [elm-discuss] How can you find out why JSON decoding failed?
Thank you Overmind! -- 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.
Re: [elm-discuss] How can you find out why JSON decoding failed?
Hehe, happens to us all. ^.^ On Friday, February 17, 2017 at 11:54:47 AM UTC-7, Rex van der Spuy wrote: > > Oops!! Ignore the error above! > It works now completely!!! > > I just had another stray Debug.crash in my code that I had forgotten about > so I removed it. > > Thanks so much Peter, I could not have done this without your help > > -- 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.
Re: [elm-discuss] How can you find out why JSON decoding failed?
Oops!! Ignore the error above! It works now completely!!! I just had another stray Debug.crash in my code that I had forgotten about so I removed it. Thanks so much Peter, I could not have done this without your help -- 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.
[elm-discuss] Re: `value` attribute disappearing from an `option` tag - possible VirtualDom problem?
The behaviour I see is that when first rendered there is no value attribute, but after any update to the dom, the attribute is set correctly (to or (but not in IE11)). Looking at the source it seems to me that this is one of those cases where there is a distinction between setting a dom attribute and setting a dom property. The problem is not in the VirtualDom but in the Html library. The "value" attribute is defined as a stringProperty while it should be an attribute (at least for the option tag) so it is set with "setAttribute()". https://github.com/elm-lang/html/blob/master/properties-vs-attributes.md On Thursday, 9 February 2017 12:38:19 UTC-3, Brian Marick wrote: > > I have an app with multiple tabs. (See below.) The user clicks on a tab to > navigate (using elm-lang/navigation) to another page. The “home” page has a > select box on it, containing this: > > > Any > bovine > equine > > > (As shown by Firefox inspector.) After changing the page and immediately > clicking to go back to the home page tab, the inspector shows that the > first option has changed to this: > > Any > > That only happens when the value is an empty string - adding as little as > a space makes the problem go away. > > Is this a bug? > > -- 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.
Re: [elm-discuss] How can you find out why JSON decoding failed?
What does Json.Decode.decodeValue returns? Can you share some code? On Fri, Feb 17, 2017 at 7:09 PM, Rex van der Spuywrote: > Yes - how would I get the Err result? > > -- > 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. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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.
Re: [elm-discuss] How can you find out why JSON decoding failed?
Yes - how would I get the Err result? -- 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.
Re: [elm-discuss] How can you find out why JSON decoding failed?
Where is it failing silently? Are you calling Json.Decode.decodeValue and not getting an Err? On Fri, Feb 17, 2017 at 6:34 PM, Rex van der Spuywrote: > Hi Everyone! > > I'm trying to decode some JSON from localStorage. > I'm able to load the JSON into my Elm app but the decoding is failing > silently. > Is there some way to find why decoding didn't succeed? > > Thanks! > > -- > 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. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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.
Re: [elm-discuss] Community version of the elm guide gitbook?
Is it elm-tutorial by any chance? https://www.elm-tutorial.org/en/01-foundations/06-type-aliases.html On Fri, Feb 17, 2017 at 5:51 PM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > I seem to recall there is a community version of this that is more open to > accepting contributions: > > https://guide.elm-lang.org/types/type_aliases.html > > Can't find it though... anyone? > > -- > 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. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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.
[elm-discuss] How can you find out why JSON decoding failed?
Hi Everyone! I'm trying to decode some JSON from localStorage. I'm able to load the JSON into my Elm app but the decoding is failing silently. Is there some way to find why decoding didn't succeed? Thanks! -- 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.
[elm-discuss] Community version of the elm guide gitbook?
I seem to recall there is a community version of this that is more open to accepting contributions: https://guide.elm-lang.org/types/type_aliases.html Can't find it though... anyone? -- 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.