Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 16 20:07
    matthewp commented #5384
  • Oct 16 20:06
    matthewp labeled #5384
  • Oct 16 20:06
    matthewp opened #5384
  • Oct 16 19:53
    matthewp opened #5383
  • Oct 16 16:23
    phillipskevin closed #4841
  • Oct 15 21:43

    phillipskevin on master

    Update dist for release (compare)

  • Oct 15 21:43

    phillipskevin on v6.1.1

    Update dist for release 6.1.1 (compare)

  • Oct 15 21:34

    phillipskevin on can-observable-mixin-1.0.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-observ… Merge branch 'master' into gree… Merge pull request #5382 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5382
  • Oct 15 21:34

    phillipskevin on can-make-map-1.2.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-make-m… Merge pull request #5380 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5380
  • Oct 15 20:30
    phillipskevin synchronize #5382
  • Oct 15 20:30

    phillipskevin on can-observable-mixin-1.0.2

    fix(package): update can-observ… fix(package): update can-simple… Merge pull request #5372 from c… and 2 more (compare)

  • Oct 15 20:30
    phillipskevin opened #5382
  • Oct 15 20:28

    phillipskevin on can-simple-map-4.3.3

    (compare)

  • Oct 15 20:28

    phillipskevin on master

    fix(package): update can-simple… Merge pull request #5378 from c… (compare)

  • Oct 15 20:28
    phillipskevin closed #5378
  • Oct 15 20:26

    phillipskevin on can-observable-mixin-1.0.1

    (compare)

Christopher Oliphant
@RALifeCoach
thanks
Kevin Phillips
@phillipskevin
@RALifeCoach is there something specific you want me to look at in the jsbin?
are you just wondering why the last line doesn’t work?
Christopher Oliphant
@RALifeCoach
I am just wondering why the last line doesn’t work. It seems I cannot replace an attribute which is an object.
Kevin Phillips
@phillipskevin
it just looks like that attribute is not set
Christopher Oliphant
@RALifeCoach
it is set earlier - it becomes unset when I try to update the player object
Kevin Phillips
@phillipskevin
is this related to the question about not using Maps?
Christopher Oliphant
@RALifeCoach
yes
Kevin Phillips
@phillipskevin
does jquery.attr allow you to pass objects?
Christopher Oliphant
@RALifeCoach
I’m not sure. I can try in the JSBin.
Kevin Phillips
@phillipskevin
I think that is the problem
it looks like it’s toStringing your object
Christopher Oliphant
@RALifeCoach
okay, any ideas on a solution?
Kevin Phillips
@phillipskevin
this is something you need to do in your real code?
Christopher Oliphant
@RALifeCoach
is there a can equivalent?
Yes, this is something that will have to happen in my code.
Kevin Phillips
@phillipskevin
so you call template({pid: '11111', player: player}) with the initial data from the server
and then later you need to update it?
Christopher Oliphant
@RALifeCoach
yes - that is correct
the data in player will change often
Kevin Phillips
@phillipskevin
so maybe there is some confusion
@justinbmeyer in many ways my code is quite simple. All data is display only. There is some binding against controls, but not against the data itself.
I definitely misunderstood that to mean the data wouldn’t be changing
I have to run to a meeting, be back in a few
Christopher Oliphant
@RALifeCoach
okay - thanks
Kevin Phillips
@phillipskevin
I would say that you do want to use a Map then
but maybe Justin can explain more what he was suggesting when he is around later
Christopher Oliphant
@RALifeCoach
actually - your question started me thinking - I changed .attr(‘player', player) to .data(‘player’, player) and the JSBin is now working
Kevin Phillips
@phillipskevin
it’s working? or it’s just not throwing an error?
I don’t see it change to iiiii ppppp
Christopher Oliphant
@RALifeCoach
You’re right - I spoke too soon
Bummer
Christopher Oliphant
@RALifeCoach
that’s working
it’s a bit sketchy, but it’s working
Kevin Phillips
@phillipskevin
ok
I’m not really sure if that will perform any better
Christopher Oliphant
@RALifeCoach
either am I
and it will take me a couple of hours of work to find out
Thomas Sieverding
@Bajix
Why are you doing this playerStr stuff?
You can just set player to an object
Christopher Oliphant
@RALifeCoach
Because I am trying to pass an object into the component via attributes
that didn’t work when I tried it
Thomas Sieverding
@Bajix
You’re trying to construct the component from JSON passed as attributes?
Christopher Oliphant
@RALifeCoach
yes
Thomas Sieverding
@Bajix
I think something akin to data-player=‘{“foo”:”bar”}’ would work
This would only work on insertion
Also, but why?
Christopher Oliphant
@RALifeCoach
I have the insertion working fine. I need help getting the update to work.