Where communities thrive


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

    greenkeeper[bot] on can-simple-map-4.3.3

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

  • Oct 14 20:19
    greenkeeper[bot] labeled #5377
  • Oct 14 20:19
    greenkeeper[bot] opened #5377
  • Oct 14 20:19

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Oct 14 20:18
    greenkeeper[bot] labeled #5376
  • Oct 14 20:18
    greenkeeper[bot] opened #5376
  • Oct 14 20:18

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Oct 14 14:43
    greenkeeper[bot] closed #5373
  • Oct 14 14:43

    greenkeeper[bot] on can-deep-observable-1.0.1

    (compare)

  • Oct 14 14:42

    m-mujica on update-deep-observable

    (compare)

  • Oct 14 14:42

    m-mujica on master

    Update can-deep-observable to l… Merge pull request #5374 from c… (compare)

  • Oct 14 14:42
    m-mujica closed #5374
  • Oct 14 14:42
    m-mujica closed #5365
  • Oct 14 14:09
    f-ricci starred canjs/canjs
  • Oct 14 13:55
    greenkeeper[bot] commented #5375
  • Oct 14 13:55

    greenkeeper[bot] on core-js-3.3.2

    chore(package): update core-js … (compare)

  • Oct 14 10:51
    m-mujica review_requested #5374
  • Oct 14 07:43
    rjgotten commented #5358
qantourisc
@qantourisc
I also have some "recrusive" bindings, or is there a better way to do it ? I wish to listen to myDefineMapInstance.member.submember. But member might not be defined yet.
Kevin Phillips
@phillipskevin
so for the first ones, you basically need to call off
each this.on("field",func); should have a matching this.off("field",func);
qantourisc
@qantourisc
I'd be happy to. I was quite literal in my initial question though: where/when ? I'd be happy to cleanup, but I need some hook for when things "disappear".
Kevin Phillips
@phillipskevin
when are you setting them up?
qantourisc
@qantourisc
Mostly if not all can.components, and members of the ViewModel
curse the lack of clear RAII on JS ;)
Kevin Phillips
@phillipskevin
are you calling it in init?
qantourisc
@qantourisc
yes
Kevin Phillips
@phillipskevin
ok, can you do it in inserted instead? (or the connectedCallback in newest versions)
qantourisc
@qantourisc
Sorry, i feel to green in javascript memory management to provide the answers you seek without so many questions.
I think running them during inserted would be possible yes.
Kevin Phillips
@phillipskevin
if you can set up the listeners in inserted then you can remove the listeners in beforeremove
also, there are probably better ways to do these things without having to manually setup/teardown event handlers
can-component's events object does this cleanup for you
qantourisc
@qantourisc
Looks intrestesting, i'm tempted to call ViewModel.my_cleanup() from beforeremove for my convienece though.
Kevin Phillips
@phillipskevin
or using derived properties in the viewmodel is even better
qantourisc
@qantourisc
Derived sound nice. he! reminds me of some ugly code I have going.
I have a DefineMap that combines 2 DefineMaps into a new view, with writable properties, but .... I had to manually bind and trigger events in the combining DefineMap.
Ideally it would have been a DefineMap.value function thing, but I couldn't get writes to work to it
Kevin Phillips
@phillipskevin
that is what the prop.lastSet is for
for handling when the property is set
qantourisc
@qantourisc
ooo, thanks i'll look into that after doing this other unrelated change !
It works, but it's yet another bind ;)
qantourisc
@qantourisc
let some_leaf = can.compute(()={
   if (this.a === undefined) return undefined;
   return this.a.b;
});
some_leaf.on("change",()....);
Is there a better way to said above ?
This message was deleted
RanjanSubbiah-tc
@RanjanSubbiah-tc
@phillipskevin how's it going? can I bug you for some help with the question I posted above ?
Kevin Phillips
@phillipskevin
@RanjanSubbiah-tc sorry, busy day. Yeah, as far as I know that should work.
@qantourisc can you share more of the code?
qantourisc
@qantourisc
@phillipskevin Not sure how to show more code. The idea is I wish to be notified if a map.map.map.key is set when map.map hasn't been set yet. As such you can't listen to the changes yet.
and observer/compute seems sanest ?
Kevin Phillips
@phillipskevin
yeah, an observation would work
Dovid Bleier
@dbleier
hello, not sure if I should post here or in steal, but when I build my app and try to run under production.html I am getting the following error that I have never seen before
Error: Error loading "menuboard-manager@5.6.12#styles.less!less" at <unknown>
Error loading "menuboard-manager@5.6.12#styles.less!less" from "menuboard-manager@5.6.12#main" at http://10.0.0.1:9004/dist/src/main.js
Error loading "less" at http://10.0.0.1:9004/dist/less.js
File not found: http://10.0.0.1:9004/dist/less.js
    at error (steal.js:3055)
    at XMLHttpRequest.xhr.onreadystatechange (steal.js:3065)
why would it try to load less.js styles.less is contained in the main.css file
this is a can2 project
RyanMilligan
@RyanMilligan
I'm playing around with some ideas for overhauling our use of components in one of our CanJS-based applications, and I have a question about partials and content/can-slot elements. Is it possible to call a partial and pass it a content template? I tried this and it didn't work:
{{<test}}This is a partial! <b><content /></b>{{/test}}

{{>test}}And here is the content.{{/test}}
It seems like this would be the way to do it if were supported, so I'm guessing it's not. I was just wondering if anything like this is on the radar anywhere.
Justin Meyer
@justinbmeyer
DoneJS Contributors Meeting: https://www.youtube.com/watch?v=Zb6jv4rxizs
Gregg Roemhildt
@roemhildtg
Hi yall.
Just wondering, one thing I struggle with is using canReflect.onKeyValue and managing the handler. Is there an easier way to remove event handlers?
Kevin Phillips
@phillipskevin
@roemhildtg you can use listenTo / stopListening
Gregg Roemhildt
@roemhildtg
Gotcha, that'd work for a define map, but in this case my obj isn't a define map
I've done some integration with a 3rd party observable using canReflect so I need to use canReflect.onKeyValue
I guess I can stick with canReflect.onKeyValue/offKeyValue but it makes it difficult.
It'd be nice if canReflect.onKeyValue returned a function or object that I could use to unbind
Viktor Busko
@Lighttree
Hi, maybe someone know, how safe to use CanJS@3 and CanJS@5 on the same page, but in different bundles ?
We have some kind of small apps that rendered on the same page, and I wan't to start migration from 3 to 5 for one of them (at some stage). Is this good idea at all, maybe they mutate something globally and conflict possible ? I hope that the fact that they don't share dependencies (this is separate bundles) will allow us do this, but not sure.
We have some issues with CanJS@2 and 3 on the same page, but we found some workarounds for this case.
Frank Lemanschik
@frank-dspeed
@Lighttree unstable not safe