Thank you, Peter. You've described a nice solution.
The problem I'm having, though is that when I try to send Child2.someMsg the
compiler tells me that `Child2` does not expose `someMsg`. I am, however
exposing it in the module shown in the code below.
How does one create a Msg to then send t
Mr. Dubray,
Welcome to the Elm list. :)
>From my past experience on this list I found that discussions without code
tend to be less productive because, as I view it, the decisions regarding
Elm's direction are being made on the grounds of both theory and practice.
Evan has a repository of small
You have multiple ways to address this, depending on the role or the ID.
If the ID is just an identifier of the child, it should not be in the child
because it has nothing to do with the child functionality. It should be in
the parent, similar to the way CounterList is implemented in the tutorial.
IMHO, modern front-end architecture do not pay enough attention to the way
application state is mutated. They focus either on "wiring" (RxJs) or
"effects". SAM's TLA+ semantics enforce three phases to mutating
application state: propose / accept / learn. These three phases define a
single "step
Hi,
I'm new at this too and just experimenting. The model structured is
presented below. I don't think it has much to do with the model, but more
to do with the fact that the update in Child2 is expecting a Child2.Msg,
but is instead receiving a Child1.Msg.
Model Child2
---
model =
{ id: I
The syntax for embedding an app has changed
0.16
0.17
Fullscreen
Elm.fullscreen(Elm.Main);
Elm.Main.fullscreen();
This, and other 0.17 changes, can be found in the upgrade guide
https://github.c
Hi,
I am just experimenting with Elm, haven't done anything yet, so I will be
watching how this thread evolves. Looking at your case, I have but one
question: what's the model of the component you have problem with?
Regards,
Witold Szczerba
29 maj 2016 21:06 "David" napisał(a):
I need to update
Hi All,
Building my first app in .17.. I have always embedded my elm app into an
index.html for styling reasons. Since upgrading, when I click index.html in
elm reactor, I just see the html code, rather then the actual page. To see
it, I tried using open, but now I am receiving errors on how fu
I need to update 2 child components based on the Action/Msg of 1 child
component. How would I do this?
The UpdateFromChild1 contains a Child1.Msg, which contains an id. I'd like
to send the id to the models of Child1 update *and* to Child2 update.
Code:
Main update
---
update msg model =
c
Rex: I totally concur. The move of Collage and Element out of the core was
sad, since it no longer works in elm-lang/try. We lost a great showcase for
Elm, especially when trying to attract people who are NOT web developers,
which comprises the overwhelming majority of the population.
Elm was
I actually think that Graphic.Collage and Graphics.Element are a better
paradigms for making interactive media than elm-html.
It was in fact the genius behind those APIs that attracted me to Elm in the
first place.
I only work in HTML-land because Collage/Element aren't as performant or
granular
>
> What exactly do you mean by "breaks my elm-stuff directory?" Are you
> getting a specific error message when you do elm package install or elm
> make?
>
Well, Elm updates the packages, compiles everything but when I open it I
get a JavaScript error in my console which disappears only if I
you can also use no case :
noteToMIDINumber : ( Note, Octave ) -> MidiNote
noteToMIDINumber ( note, octave ) =
let
idxOrZero idx n =
if n == note then
idx
else
0
notes =
[ C, Db, D, Eb, E, F, Gb, G, Ab, A, Bb,
Do you really need such a huge number of cases?
I think the following should work:
mapNote : Note -> Int
mapNote note =
case note of
C -> 0
Db -> 1
D -> 2
Eb -> 3
E -> 4
F -> 5
Gb -> 6
G -> 7
Ab -> 8
A -> 9
What is the status of this? I really need the functionality in one of my
projects.
Thanks
-- Cezar
On Thursday, November 26, 2015 at 12:59:32 PM UTC+2, Jan Dudek wrote:
>
> Thanks, I really like the proposal, as I already had to use NoOps several
> times. (Although none of my codebases was a “s
Answering my own question, just in case someone else gets this error.
I found that if I defer the initialization to after the dom has loaded,
everything's fine.
Here's what *elm-import.js* looks like:
document.addEventListener('DOMContentLoaded', function() {
16 matches
Mail list logo