Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:07
    matthewp commented #5384
  • 20:06
    matthewp labeled #5384
  • 20:06
    matthewp opened #5384
  • 19:53
    matthewp opened #5383
  • 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)

Justin Meyer
@justinbmeyer
anyway, I'm going to have to start the training now. I will hopefully be available after 7 PM CST, but I might go to dinner
and then talk to my wife / baby
and hopefully after that be available
Christopher Oliphant
@RALifeCoach
@justinbmeyer I do appreciate your help. Now that I know, I will make plans to work on other tasks. When you are free, please fill in the details to your “don’t need a Map” statement. I will check tonight or tomorrow for details. Enjoy your time eating, and spending time with your wife and baby.
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach I think @phillipskevin gave details about that
he means use plain javascript objects
Christopher Oliphant
@RALifeCoach
@phillipskevin wrote, "@phillipskevin
He might just mean to pass the raw data to your template
instead of creating a can.Map instance and passing that” notice the word ‘might’ and I asked how would I pass the data, would I use attributes when creating the fragment to add to my document?
Kevin Phillips
@phillipskevin
I didn’t see you ask anything
just like this:
var template = can.stache('<player-row id="player-row-{{pid}}" {pid}="pid" {parent}="parent"></player-row>');
            var fragment = template({
                pid: this.pid,
                parent: this
            });
Christopher Oliphant
@RALifeCoach
at 10:25 I wrote, "Are you suggesting that I pass all data as attributes to the component? There are a lot of attributes!”
Kevin Phillips
@phillipskevin
sorry, I wasn’t trying to be confrontational. I just meant, I didn’t think you wanted more info on my suggestion.
so, in the code above, it is just a plain object being passed to the renderer
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