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)

Brad Momberger
@bmomberger-bitovi
It will show you everywhere the package tree contains it.
Dovid Bleier
@dbleier
aha
3.15 and 3.1.3
Thomas Sieverding
@Bajix
@dbleier you need the -g flag on npm-check-updates for it to setup the bin symlinking. That gives you a bash command, ncu, that will help update package.json files
Dovid Bleier
@dbleier
ok
updated can-observation to 3.1.5, still not working
:(
Dovid Bleier
@dbleier
I am even sure how to track this down. Every time I try a profiling tool in devtools, the page freezes and I have to kill it and then lose the profiling data
only thing I can think of, is remove the sub-components and readd one by one until I find the one where the leak is happening
fyi, I am just trying to get the minimum upgrade working now, so still using can-map and not DefineMap
Dovid Bleier
@dbleier
good news, I figured out which component is causing the error, so I'll continue to track it down
@Bajix @bmomberger-bitovi thanks for you help
Brad Momberger
@bmomberger-bitovi
Let us know if the root cause is something we can help you with
Dovid Bleier
@dbleier
ok, thanks
gregorgodoy
@gregorgodoy
@bmomberger-bitovi I tried to apply your suggestion. What i did so far is copy superMap and create a file called mySuperMap. I pretend to put all the customizations that are common between the models, so i will not need to specify the same on each model (for example the API needs some special headers). Then all my model will pass the options to mySuperMap instead to superMap. At the end i paste you code. The problem is im newbie to donejs, so i dont know what happens "behind the scenes" and im sure i should not just paste the code. So, first, thanks for the patient, but could you show me the example of how should it be done? Oh, and sorry for the poor english, its a foreign language for me!
Yeswanth Raghav T
@tyraghav
What does this do in the controller JS file...??
this.options.myModel=new MyModelDisplay("#myModelDisplay", { 'sharedModel':this.options.userModel});
Can anyone please help...
Brad Momberger
@bmomberger-bitovi
@tyraghav I can guess based on the arguments passed that MyModelDisplay is a can.Control subclass, and a new instance is being attached to an element with the id myModelDisplay, then a reference to that Control is attached to the options of this which is probably also a can.Control
Brad Momberger
@bmomberger-bitovi
@gregorgodoy Sure. The relevant part of the documentation for what we're doing is in https://canjs.com/doc/can-connect.html#Overwritebehaviors but I'll give a more concrete example. Give me a few minutes while I spin up a Glitch.
Brad Momberger
@bmomberger-bitovi
OK check this out: here's a regular can-connect doing all the superMap stuff, while also adding your behavior in at the end. https://glitch.com/edit/#!/can-connect-custom-behaviors?path=app.js:63:1
At the bottom you see two file instances created, one has the _new property and one doesn't. Click "Show Live" at the top and you'll see the fixtures log a create message and an update message
gregorgodoy
@gregorgodoy
@bmomberger-bitovi AWESOME! :clap: :clap: :clap: Now i understand how behaviors works and what superMap does. I just was following the Place My Order Guide, without knowing what superMap does. Thanks again for the code example and the comments between them! Invaluable help!!
Pedro Mendes
@pmgmendes
Hi all,
For a specific model layer I need to apply some transformation in the raw response retrieved from the server.
Because the request parameters must be available when doing the transformation the data callbacks seem to be the way to go because the got* methods provide both response and request parameters as arguments.
The problem here is that the gotInstanceData method is not paired with getData in the data/callbacks behavior. I've opened an canjs/can-connect#301 for this.
Meanwhile, is there any other interface beside getData that provides both response and request data? I want to avoid overwriting getData because I don't want to setup the request manually..
Thanks.
Brad Momberger
@bmomberger-bitovi
You can use the getData() interface in a custom behavior that you inject, for example, in between data/parse and data/url. Just call baseConnection.getData() from within your own getData function, and put your custom behavior at the right point in the ordering.
This is similar to the demo I did for @gregorgodoy earlier, but you'd want to inject your behavior in the middle of the list instead of at the bottom.
As long as you're calling baseConnection.getData from your own getData, you don't have to do your own request setup. It will just pass through to data/url, or feathers, or whatever base you're using.
Nils Lundquist
@nlundquist
@pmgmendes I've responded to your issue. In the meantime however the best approach would what @bmomberger-bitovi suggests - overwriting getData in a custom behavior, calling the overwritten implementation of getData within it, and then doing whatever transformation you need to do to the response returned from the base implementation
Ranjan Subbiah
@ranjanbuilds

hi, I am doing some unit testing using sinon.js and it modifies the viewmodel with its stub and spy methods. We are using defineMap.extend({seal:true},{}) and are therefore getting the following error when using sinon:

Cannot define property handleSalePrice, object is not extensible

handleSalePrice is the function being stubbed. In our test file we are importing ViewModel and assigning it to vm variable const vm = new ViewModel(). I am wondering if there is a easy way to set seal:false when importing in test file.

Brad Momberger
@bmomberger-bitovi
new (ViewModel.extend({ seal: false}, {})();
Though it may be much easier to stub and spy on ViewModel.prototype instead, if you don't need separate stubs for separate instances.
Ranjan Subbiah
@ranjanbuilds
thanks very much Brad
Ranjan Subbiah
@ranjanbuilds
@bmomberger-bitovi would you mind pointing me in the right direction re: stub and spy on ViewModel.prototype, not entirely sure what you mean
Note that this won't run in JSBin initially, because sinonjs.io is a gh-page and doesn't have the correct security certificate.
Load up https://sinonjs.org/releases/sinon-2.3.2.js in your browser and click through the security warnings. Then it will work for you
Ranjan Subbiah
@ranjanbuilds
awesome, thank you, running into a meeting but will look when I get back
Pedro Mendes
@pmgmendes
@bmomberger-bitovi Thanks for the feedback. I've added that custom behavior implementing getData method and placed it between data/parser and data/url. That getData method is only called when I move the custom behavior after data/url. Either way, @justinbmeyer just labeled the issue as bug so as suggested I'm gonna try to do a pull request.
@nlundquist Thanks for the help.
Julian
@pYr0x
@phillipskevin are you planing to release a can-stache 4.0?
Kevin Phillips
@phillipskevin
nope
well, yeah, eventually
but we don’t know what is going to be in can-stache 4.0 yet
Julian
@pYr0x
i was working on some issues
canjs/can-stache#19
canjs/can-stache#15
fist issue is merged into minor
Kevin Phillips
@phillipskevin
major you mean?
Julian
@pYr0x
jup .. major
Kevin Phillips
@phillipskevin
cool
we’ll definitely use that for 4.0