Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 14 12:04
    CalvinWalzel starred canjs/canjs
  • Feb 13 05:42
    liyanlong starred canjs/canjs
  • Feb 11 22:25
    greenkeeper[bot] commented #5450
  • Feb 11 22:25

    greenkeeper[bot] on semver-7.1.3

    chore(package): update semver t… (compare)

  • Feb 11 19:20

    greenkeeper[bot] on steal-tools-2.2.6

    (compare)

  • Feb 11 19:06

    greenkeeper[bot] on steal-tools-2.2.6

    chore(package): update steal-to… (compare)

  • Feb 11 11:17

    greenkeeper[bot] on webpack-4.41.6

    (compare)

  • Feb 11 11:06

    greenkeeper[bot] on webpack-4.41.6

    chore(package): update webpack … (compare)

  • Feb 10 23:01
    cherifGsoul commented #5468
  • Feb 10 23:00
    cherifGsoul reopened #5468
  • Feb 10 22:59
    cherifGsoul closed #5468
  • Feb 10 22:59
    cherifGsoul commented #5468
  • Feb 09 05:23
  • Feb 08 20:24
    piraz opened #5468
  • Feb 08 10:41
    randy-r starred canjs/canjs
  • Feb 07 23:40
  • Feb 07 23:40
    MedRedha starred canjs/canjs
  • Feb 03 22:16

    greenkeeper[bot] on @octokit

    (compare)

  • Feb 03 22:15

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Feb 03 06:23

    greenkeeper[bot] on @octokit

    (compare)

Kevin Phillips
@phillipskevin
using the async getter with resolve, you don't have to do it that way
user is the value if you use resolve
Frank Lemanschik
@frank-dspeed
but then i can also do no waiting like if isResolved right?
because i only get the value
i understand the diffrence is getting a promis or a value i understand
Kevin Phillips
@phillipskevin
right
Frank Lemanschik
@frank-dspeed
do you know a code that would allow me to change the value every x secunds?
Kevin Phillips
@phillipskevin
I usually do promises like this:
    userPromise: {
        get: function () {
            return userConnection.get();
        }
    },
    user: {
        get: function(last, resolve) {
            this.userPromise.then(resolve);
        }
    }
so you can do userPromise.isResolved and also user.name
in the template
Frank Lemanschik
@frank-dspeed
ah nice now i understand
why this is in some examples
i saw that :)
AntonProkofyev
@AntonProkofyev
yep that's what i saw in docs and i can see name when it's resolved...
i've add breakpoint but it gives nothing. just see that Object.defineProperty(map, "_instanceDefinitions", { make an error
and that map constructor is DefineMap
Frank Lemanschik
@frank-dspeed
but do you know a way to reset a value with a interval?
Kevin Phillips
@phillipskevin
@frank-dspeed use a setter
Frank Lemanschik
@frank-dspeed
how you mean that?
i have really no idea about that because for me a setter gets only called on set
and then you mean i can do var x = interval() in the setter
Kevin Phillips
@phillipskevin
foo: {
  value: 1,
  set(val) {
    setTimeout(() => { this.foo+=1 }, 1000);
    return val;
  }
}
Frank Lemanschik
@frank-dspeed
and it gets executed?
and that gets automatic executed?
does the setter get executed with value ?
Kevin Phillips
@phillipskevin
yeah
Frank Lemanschik
@frank-dspeed
ok ok
looks pritty cool
Kevin Phillips
@phillipskevin
@AntonProkofyev can you check what is propand value ?
and walk up the stack to the first place that is in your code
to see what is being called
AntonProkofyev
@AntonProkofyev
can you сlarify plz what you mean by checking what is prop and value
i can see that this defineMap appears somwhere near reflection/get-set
setKeyValue
Kevin Phillips
@phillipskevin
the parameters that function is being called with
AntonProkofyev
@AntonProkofyev
i can see that this defineMap is definening in can-stache-bindings.js in
var viewModel = bindingData.getViewModel()
prop is name
Frank Lemanschik
@frank-dspeed
as i sayed you need to define name in your model first
AntonProkofyev
@AntonProkofyev
value is definemap
{name:Name}
@frank-dspeed what do you mean? can you clarify plz
Frank Lemanschik
@frank-dspeed
your applying can-connect to a Model right?
a defineMap
AntonProkofyev
@AntonProkofyev
i would like to add the response obj to the viewmodel of a component
viewmodel is defineMap
AntonProkofyev
@AntonProkofyev
may be there is any different sollution?
Gregg Roemhildt
@roemhildtg
@phillipskevin I think canjs/canjs#3427 is actually related to my can-connect behavior. I got into ios debugging and it looks like my parseInstanceData is not being called at all which is generating the issues with the data retrieved.
Kevin Phillips
@phillipskevin
a custom behavior you mean?
Gregg Roemhildt
@roemhildtg
Yes
I think it might have to do with the order of the custom/builtin behaviors
Justin Meyer
@justinbmeyer
Contributor meeting: https://www.youtube.com/watch?v=dmwV1U3ExSQ Shows ReactViewModels, steams, and the incremental SSR stuff we have been working on
Gregg Roemhildt
@roemhildtg
What's the best order to put can-connect behaviors in? currently I have this, but its still not working on ios...
    var behaviors = [
        canConstructor,
        canMap,
        canRef,
        RestlessData, //custom getlist, createdata, getdata, etc
        constructorStore,
        dataCallbacks,
        dataParse,
        RestlessParse, //custom parseListProp, parseInstanceData 
        realTime,
        callbacksOnce
    ];