Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:45
    greenkeeper[bot] labeled #5387
  • 12:45
    greenkeeper[bot] opened #5387
  • 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

    fix(package): update can-stache… (compare)

  • 09:49
    chasenlehara edited #5384
  • 09:47
    chasenlehara edited #3864
  • 09:46
    chasenlehara edited #5383
  • Oct 17 20:12

    matthewp on master

    Update dist for release (compare)

  • Oct 17 20:12

    matthewp on v6.1.2

    Update dist for release 6.1.2 (compare)

  • Oct 17 20:04

    matthewp on master

    Update dist for release (compare)

  • Oct 17 20:04

    matthewp on v6.1.2-0

    Update dist for release 6.1.2-0 (compare)

  • Oct 17 19:17
    akbaruddin starred canjs/canjs
  • Oct 17 17:25
    matthewp edited #5384
  • Oct 17 17:00

    matthewp on can-dom-mutate-2.0.7

    (compare)

  • Oct 17 17:00

    matthewp on master

    fix(package): update can-dom-mu… Merge pull request #5386 from c… (compare)

  • Oct 17 17:00
    matthewp closed #5386
  • Oct 17 16:27
    greenkeeper[bot] labeled #5386
  • Oct 17 16:27
    greenkeeper[bot] opened #5386
  • Oct 17 16:27

    greenkeeper[bot] on can-dom-mutate-2.0.7

    fix(package): update can-dom-mu… (compare)

  • Oct 17 16:25

    matthewp on can-dom-mutate-2.0.6

    (compare)

  • Oct 17 16:24
    matthewp closed #5379
Christopher Oliphant
@RALifeCoach
Those two attributes get converted inside the Map to 50+ attributes. I could reorganize and pass the 50+ attributes in a few objects. Is that what you are suggesting?
Kevin Phillips
@phillipskevin
I’m not suggesting any detailed solution for your code. I don’t know your codebase that well.
If what you want to do is take data you receive from a server and pass it to a template, you can just do it without creating can.Maps
by passing the raw data to your stache renderer function
I don’t know for sure if that is what Justin is proposing
Christopher Oliphant
@RALifeCoach
I will try on JSBin and see how it all hangs together
Kevin Phillips
@phillipskevin
ok
Christopher Oliphant
@RALifeCoach
@phillipskevin here is my JSBin http://jsbin.com/qahepi/edit?html,js,console,output
If I click on ‘here’ before the timer fires, then it works and the timer event throws an exception. If I wait for the timer to fire, the names disappear and clicking on the anchor throws and exception.
It is a short JSBin
Christopher Oliphant
@RALifeCoach
Things work fine when I update the simple PID property.
Kevin Phillips
@phillipskevin
Ok I'll take a look. Might be 45 mins or an hour.
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