Thanks guys.
I'm now using Json.Decode.Value and build a very forgiving decoder on top
of it and it seems good enough for now.
Will consider versioning schema if I need more control on that.
On Wed, Nov 9, 2016 at 1:14 AM, Kasey Speakman wrote:
> I would additionally make
In your design, the port has a 1-to-1 connection to the Part.
The port does not communicate for which Part the incoming message is
intended, because it "expects" that their is only 1 Part.
Your batch function in the subscriptions in the Group.elm passes on the
port message on to all your Parts.
Ok, but is it justified to make your code more complicated just to enable
testing?
--
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
I am trying to call GetUserMedia with the MediaStream API, which requires
the use of Promises. Is there a good way to work with promises in Elm at
this point? Can it be done with Task or Process API? Or should this piece
of my code be done entirely in Javascript? Thanks.
--
You received
Could you run Time.now andThen calculate the amount of time left until expiry,
then Process.sleep until then?
--
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
That is expected. Generally you'd have a uniquely named port per module
unless they really do all need to get the message. It might be better if
you describe what you are trying to accomplish instead of how to accomplish
it? :-)
On Tuesday, November 8, 2016 at 10:19:37 AM UTC-7, Matthieu
You could propably "tick" (as in example from docs) every few seconds and
return Cmd.none if you're before expiration, and some other Cmd otherwise.
Does it make sense?
Regards,
Witold Szczerba
08.11.2016 5:22 PM "'Rupert Smith' via Elm Discuss" <
elm-discuss@googlegroups.com> napisaĆ(a):
> I
As someone casually observing Elm development, I'm very surprised by this;
does Elm really make your life so easy you've never needed to set
breakpoints and step through your code? It's hard for me to imagine
writing a large-scale app without having to do that from time to time.
On Saturday,
Hi, I am currently struggling with port subscriptions in a submodule
(`Part`)
reused multiple times in a bigger (`Group`) module like:
-- In Group.elm
type alias Model =
{ parts : Array Part.Model }
I've been using the following "batching" technique (here are the relevant
parts of 3 files:
I would additionally make each migration function only go from one version
to the next version up. Then chain them together up to the latest version.
That way you only have to make 1 migration function for each version bump
and leave the others untouched and still upgrade from any previous
On Tuesday, November 8, 2016 at 5:00:54 PM UTC, Rupert Smith wrote:
>
> On Tuesday, November 8, 2016 at 4:22:08 PM UTC, Rupert Smith wrote:
>>
>> subscriptions : Model -> Sub Msg
>> subscriptions model =
>> if afterCloseToExpiryTime then
>>Time.every Time.second RefreshTokenMsg
>> else
>>
On Tuesday, November 8, 2016 at 4:22:08 PM UTC, Rupert Smith wrote:
>
> subscriptions : Model -> Sub Msg
> subscriptions model =
> if afterCloseToExpiryTime then
>Time.every Time.second RefreshTokenMsg
> else
>Sub.none
>
I'm also struggling to get my head around how to implement
I have an authentication token that I know expires at a particular moment
in time:
type alias AuthState =
{ loggedIn : Bool
, permissions : List String
, expiresAt : Maybe Date
}
I would like to fire an event once it gets close to 'expiresAt'.
What happens if I update the
13 matches
Mail list logo