Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:06
    chamsou123 starred canjs/canjs
  • Jan 25 20:18

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 25 20:16

    greenkeeper[bot] on @octokit

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

  • Jan 24 23:05
    greenkeeper[bot] commented #5422
  • Jan 24 23:05

    greenkeeper[bot] on @feathersjs

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

  • Jan 24 23:05
    greenkeeper[bot] commented #5401
  • Jan 24 23:05

    greenkeeper[bot] on @feathersjs

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

  • Jan 24 22:58

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 24 22:57

    greenkeeper[bot] on @octokit

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

  • Jan 24 20:42
    bitsnaps starred canjs/canjs
  • Jan 24 10:50
    chasenlehara opened #5462
  • Jan 24 10:48

    chasenlehara on chasenlehara-patch-1

    Upgrade to can-queues@1.3.2 (compare)

  • Jan 24 10:41

    chasenlehara on can-simple-dom-1.7.1

    (compare)

  • Jan 24 10:41
    chasenlehara closed #5458
  • Jan 24 10:40

    chasenlehara on can-stache-bindings-5.0.4

    (compare)

  • Jan 24 10:40
    chasenlehara closed #5455
  • Jan 24 10:40

    chasenlehara on can-stache-5.1.0

    (compare)

  • Jan 24 10:40
    chasenlehara closed #5453
  • Jan 24 10:40

    chasenlehara on can-map-4.3.12

    (compare)

  • Jan 24 10:40
    chasenlehara closed #5452
Frank Lemanschik
@frank-dspeed
ithink its because user.name
is not a property
but my english is to bad to explain you that better and shorter simply wait for some one but it looks like your doing it wrong
AntonProkofyev
@AntonProkofyev
mmm i got response {name: 'Name'} from the server and i see Name on the page
Kevin Phillips
@phillipskevin
can you put a breakpoint in define-helpers and see what property is being set?
Frank Lemanschik
@frank-dspeed
i can't tell you more i never used it like you do
with the lastSetValue and resolve
i return the value and i get the value
Kevin Phillips
@phillipskevin
take a look at canjs/can-route#98
see if it is the same thing you are doing @AntonProkofyev
Frank Lemanschik
@frank-dspeed
@phillipskevin couldn't he directly return the promis and don't use resolve?
i think he could simply return userConnection.get() ?
Kevin Phillips
@phillipskevin
he could, but it would make the template more complicated
and not fix this problem
Frank Lemanschik
@frank-dspeed
why would that affect the template
i always return pormis
and get directly the value
Kevin Phillips
@phillipskevin
you have to do user.value.name in the template
AntonProkofyev
@AntonProkofyev
mmm let me check
Frank Lemanschik
@frank-dspeed
hmmm i always do this each stuff for user.value
Kevin Phillips
@phillipskevin
@AntonProkofyev the way your code is, user.name is fine
Frank Lemanschik
@frank-dspeed
and that works great
ah
Kevin Phillips
@phillipskevin
you can do it that way, @frank-dspeed
Frank Lemanschik
@frank-dspeed
then i have no value when i use his code style
interristing
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