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)

Justin Meyer
@justinbmeyer
finish making it work with can.Component and all the view bindings
Christopher Oliphant
@RALifeCoach
unless you expect a version 2.4 that would make sense to have in my project
Justin Meyer
@justinbmeyer
I doubt it. 3.0 is already underway
Christopher Oliphant
@RALifeCoach
okay, then that’s probably what I will do
Justin Meyer
@justinbmeyer
for what you need
Christopher Oliphant
@RALifeCoach
then I can test the performance against the 3.0 code and I may not need the changes
Justin Meyer
@justinbmeyer
well, I would still make a pull request to open up can.Map
Christopher Oliphant
@RALifeCoach
okay
Justin Meyer
@justinbmeyer
well, you would have to rewrite some code for can-define
it removes the need for .attr()
so, when 3.0 lands
you'll still be using it's can.Map likely
so it's probably worth it to land a pull request that exposes things
Christopher Oliphant
@RALifeCoach
okay - I will do that
Justin Meyer
@justinbmeyer
that way your plugin could work against 2.3.23 and 3.0.0
Christopher Oliphant
@RALifeCoach
alright
thanks for the chat, I’ll let you get back to work. I know you guys are crazy busy.
Justin Meyer
@justinbmeyer
Julian
@pYr0x
@justinbmeyer can you post this link in the documentation?
Dovid Bleier
@dbleier
I am not clear. What exactly is the new functionality being highlighted in the jsbin?
Mohamed Cherif Bouchelaghem
@cherifGsoul
@dbleier I think the most visible feature is the use of vanilla JS XHR object instead of jquery
Justin Meyer
@justinbmeyer
@pYr0x the link is already there
@dbleier it doesn't show off any new functionality, it's just a jsbin showing the basics working
Dovid Bleier
@dbleier
ok, kudos on ver .2
Guido Smeets
@gsmeets
hmm, I have created a viewModel with 3 instances of FooModel
now I need to save them all at once in a transaction on the server, so instead of saving the FooModels, I just add a create method on my viewModel. That post returns my 3 models, each with an id
but when I inspect them on the save's done callback, the id's are not set.
What's going on here? Anyone an idea?
Julian
@pYr0x
sorry dont understand
you save all models each
dylanrtt
@dylanrtt
@gsmeets If you are saying your original instances do not have ids set, that sounds like a model store issue because save() isn't expecting multiple models in the response. If you are using can.Model, usually you override parseModel for example, but that may not be sufficient for this case, so try makeCreate and makeUpdate.
dylanrtt
@dylanrtt
Something like this:
can.Model.extend({
    makeCreate: function(oldCreate) {
        return function(params, success, error) {
            var self = this,
                def = oldCreate(params).then(function(data) {
                    if (can.isArray(data)) {
                        return self.models(data);
                    } else {
                        return self.model(data);
                    }
                });
            def.then(success, error);
            return def;
        }
    }
},{});
Guido Smeets
@gsmeets
the question I guess is can I force a submodel to be 'created' when its parent is being saved
Guido Smeets
@gsmeets
hmm, from the looks of it it actually does work, I seem to be having some random behavior popping up at random times that messes things up
Guido Smeets
@gsmeets
for those interested, I found my problem. The saving of the object triggered some events on my viewmodel that should only be firing when the user manipulates the UI. So I've worked around it by calling this.off() prior to the save, and this.on() after the save is done. Not ideal, but it works
Kevin Phillips
@phillipskevin
@gsmeets would you mind posting your example with some code at http://forums.donejs.com/?
easier for people to find larger examples there and maybe someone can help find a more ideal solution
Guido Smeets
@gsmeets
It's extremely specific tbh, this design is imposed due to some technical constraints like an external component I use
Normally I would've solved it differently
Kevin Phillips
@phillipskevin
ok, maybe not worth posting then
Paul Tichonczuk
@tracer99
Trying to upgrade a project from can 2.2 to 2.3. I'm running into an exception in compute/read.js:248 where parent is undefined. Changing the condition to parent && parent[key] && parent[key].isComputed prevents the exception from happening and doesn't seem to have any adverse effects on the execution. However, I'm having a really hard time figuring out why this exception happens at all. In 2.2, the same code never touched read.js
Any advice?
dylanrtt
@dylanrtt
@tracer99 That is likely related to the new bindings. The change made was that can-value="key" will set the scope's key to the value of the element during initialization if key is undefined. This ensures consistency between the scope and element. The issue is if you have a parent like can-value="foo.bar" where foo is resolved asynchronously, the write fails because foo is undefined initially. Here is a breaking example that works in 2.2 http://jsbin.com/sibotojebo/edit?html,js,console,output
I previously reported this as issue #2020 (new bindings should behave this way, but old bindings should behave the old way) that was supposedly fixed, but I later found out it was not and didn't get around to re-reporting it because I had fixed all the cases where it was a problem.
This behavior can be good because it helps find bugs. To prevent the issue, you can use the template to delay the render of an element until the scope values you need are present, or add default values to your scope.
Paul Tichonczuk
@tracer99
@dylanrtt We're not using Must/Stach or components. (our app pre-dates these things). However, I'm going to go over the EJS files to see if your comment still applies to those bindings though.
dylanrtt
@dylanrtt
@tracer99 The bindings code is in view/bindings/bindings.js. You can throw some breakpoints in to see if it's being used, but I suspect not. If you pause on your error, the value of key may be helpful to track down where in your code the issue arises.
Paul Tichonczuk
@tracer99
@dylanrtt Now it' sclear and makes sense. Thanks for the tip.
Christopher Oliphant
@RALifeCoach
I am back talking about performance. I ran the same 156 rows in IE on windows 10. The load time was 27 seconds.
Thats just not going to fly with the client.
Julian
@pYr0x
?