Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 18 22:20
    greenkeeper[bot] labeled #5391
  • Oct 18 22:20
    greenkeeper[bot] opened #5391
  • Oct 18 22:20

    greenkeeper[bot] on can-observable-mixin-1.0.3

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

  • Oct 18 19:08
    cherifGsoul labeled #5390
  • Oct 18 19:07
    cherifGsoul opened #5390
  • Oct 18 18:45
    greenkeeper[bot] labeled #5389
  • Oct 18 18:45
    greenkeeper[bot] opened #5389
  • Oct 18 18:45

    greenkeeper[bot] on can-observable-bindings-1.3.0

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

  • Oct 18 18:29

    matthewp on master

    Update dist for release (compare)

  • Oct 18 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • Oct 18 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • Oct 18 17:59

    matthewp on master

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

  • Oct 18 17:59
    matthewp closed #5388
  • Oct 18 16:46
    greenkeeper[bot] labeled #5388
  • Oct 18 16:46
    greenkeeper[bot] opened #5388
  • Oct 18 16:46

    greenkeeper[bot] on can-observable-array-1.0.2

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

  • Oct 18 12:45
    greenkeeper[bot] labeled #5387
  • Oct 18 12:45
    greenkeeper[bot] opened #5387
  • Oct 18 12:45

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

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

  • Oct 18 09:49
    chasenlehara edited #5384
Morgan Heimbeck
@Xitstrategies
steal(‘can’,
‘outer.stache!’,
’inner.stache!’,
function(OuterView, InnerView) {
can.view.preload(‘inner-template’, InnerView);
return can.component.extend({
tag: ’test-tag’,
template: OuterView
});
});
Alexis Abril
@alexisabril
@Xitstrategies Ah, good call
Matthew Phillips
@matthewp
@alexisabril @Xitstrategies in 2.3 you can use can-import to import partials
there is a test for it... one sec
dylanrtt
@dylanrtt
I'm using Webstorm with the Handlebars plugin and noticed the new reference scope bindings are a bit of a problem because * is seen as invalid syntax in mustache (same with %). For example, {{myHelper *foo}} produces the error "Expected Close }}". Has anyone figured out a way around this or created a modified version of the plugin?
Gerard Finnerty
@halcyonandon
Hi, ran into an odd bug, still investigating it, but I'm curious if anyone else experienced this... when using viewModel attrs for event bindings inside a component like events: { '{viewModel} errors.someField.showErrors': function(e, ev) {}} ...for some reason, if this event fires off more than a half dozen or so times, it just stops working, stops executing, no js errors... when i trace through, that attr still gets set (on field focus), but that function just stops executing... when I move the code from there into the field focus event, there is no issue
Justin Meyer
@justinbmeyer

@here - is there a way to prevent a can.Control from hooking up one of the templated event handlers? I have a "#fileInput change" that I want to prevent from being wired up if condition isn't met (in which case I will manually wire the event to a polyfill).

ryan [4:36 PM]
I will also take care to remove the manual binding during teardown - I just didn't know if setup allowed for that kind of thing.

there is not. I would not use a templated event binding and instead us .on() inside init.
Ryan Wheale
@DesignByOnyx
ok, thanks for that.
Alexis Abril
@alexisabril
@DesignByOnyx if it's a common thing you're doing, you could also setup a custom processor. "#fileInput conditionalChange". You might need to address a syntax to pass conditions if those aren't set anywhere accessible(control options, element data, etc).
Ryan Wheale
@DesignByOnyx
Thanks for that @alexisabril. Doing it during initialization (using .on) is working best as it's clearer what's going on (no pun intended). can is still taking care of managing the event binding in most cases... which is what I wanted.
Ryan Wheale
@DesignByOnyx
So using .on() invokes handlers with an "event" parameter only - whereas CanJS templated event handlers get (element, event)parameters. This is actually convenient, but worthy of noting as the method signature has to be updated.
... when switching from templated to manual bindings.
Marshall Thompson
@marshallswain
@here With can-connect, if I want supermap functionality but I want to override getList to use feathersjs/feathers-client, is there a simple way to do that? Or do I need to start fresh and put the behaviors together manually?
Mihai Fantana
@fantanamihai
hi guys. can you please tell me if there are other options for findAll to return Array not Model.List, than models() and findAll() { return $.ajax} ?
Mihai Fantana
@fantanamihai
I am asking because we are migrating an old solution from jsmvc 3.2 to newest canjs. in jsmvc3.2 almost everytime we had a findAll, an Array was returned so we have a couple of Array methods called on data in all the project
David Luecke
@daffl
@meconcomputer Which can.List should also provide right?
Mihai Fantana
@fantanamihai
@daffl thanks for trying to understand :) We solved the problem by extending Model.List.prototype with the few Array methods we used
mpal9000
@mpal9000
Hello, is there any syntax highlighting package for sublime and other editors for *.component files of donejs?
Mihai Fantana
@fantanamihai
hi guys. canjs 2.2.9. the thing is that in our old app we are using models with get/set per attributes a lot. I found out that there is can/map/setter. Is there any reason no 'can/map/getter' is available ?
I know about 'define', but before that, what was the way to have a getter in a model?
David Luecke
@daffl
@mpal9000 I usually just set it to HTML or HTML + Handlebars if your editor supports it. If it can't do <viewmodel> tags then you can also fall back to <script type="viewmodel"> to get JS highlighting.
@meconcomputer The way to do getters in 2.2.9 is define. I think it should work together with the setter plugin although it would make sense to eventually migrate (it's much more powerful)
Mihai Fantana
@fantanamihai
@daffl thanks for the answer. We try to postpone and we will get to define later. How was getter in 2.1?
mpal9000
@mpal9000
@daffl ok thanks
Justin Meyer
@justinbmeyer
@meconcomputer you could add a can.compute to the prototype
and that could act like a getter
but please don't do that
use define :-)
migrating your setters should be straightforward
I believe they have the same signature
if you had setFoo: function(...) { ... }
you just change that to
define : {
  foo: {
    set: function(...){ ... }
  }
}
Mihai Fantana
@fantanamihai
@justinbmeyer i guess we will have to do that. thanks
Paulius
@paulius005
Im assuming you guys have abandoned canui
Matthew Phillips
@matthewp
no
but it needs a maintainer
David Luecke
@daffl
I hate to disagree but I would say yes ;) It hasn't been touched in three years and many things it was supposed to solve are now supported by the browser.
espretto
@espretto
hey,
espretto
@espretto
quick question: how can one make observable changes/events bubble up the component tree? i tried passing down an observable via component-tag attributes e.g. <child-component attr="parentObservable"> and it works as expected. It does however feel kind of weird if attr's is a computed property implemented within the child component. it seems the child overriddes the parent's possibly stubbed/non-existant implementation. any clue on this?
Ilya Fadeev
@ilyavf
can.stache("{{name}}").({name: "Name"}) returns a document fragment. How can I get a string value of it?
Justin Meyer
@justinbmeyer
why do you need a string?
Ilya Fadeev
@ilyavf
to use stache with other libraries (e.g. d3)
basically, i want to pass to my component that uses d3 a template that d3 will render its way.
Justin Meyer
@justinbmeyer
@espretto I'm not sure what you mean exactly by "attr's is a computed property implemented within the child component. it seems the child overriddes the parent's possibly stubbed/non-existant implementation."
Matthew Phillips
@matthewp
insert the fragment into a div and use div.innerHTML
Justin Meyer
@justinbmeyer
@ilyavf why do you need a string?
Ilya Fadeev
@ilyavf
@justinbmeyer to use stache with other libraries (e.g. d3: basically, i want to pass to my component that uses d3 a template that d3 will render its way)
@matthewp thanks. Is this the only way?