These are chat archives for canjs/canjs

2nd
Jul 2018
qantourisc
@qantourisc
Jul 02 2018 10:53 UTC
type:from="some-thing", but something is allowed to be undefined, is this possible ?
Mohamed Cherif Bouchelaghem
@cherifGsoul
Jul 02 2018 10:54 UTC
@qantourisc what do you mean?
qantourisc
@qantourisc
Jul 02 2018 10:55 UTC
actually: definemap, might help here with defaults, not sure if I should use it here or not tough.
can-stache/expressions/lookup.js: Unable to find key "type". because type is not defined for 1 of the objects in a list of objects
Mohamed Cherif Bouchelaghem
@cherifGsoul
Jul 02 2018 10:56 UTC
is type a property in the viewModel?
qantourisc
@qantourisc
Jul 02 2018 10:57 UTC
type is missing property of either a map or define-map or object, depending on what can converted it to.
Thinking a list of DefineMaps might be better here though
Jeroen Cornelissen
@jeroencornelissen
Jul 02 2018 12:17 UTC
How do you check if route has started (route.start())?
qantourisc
@qantourisc
Jul 02 2018 13:51 UTC
@jeroencornelissen from reading the source-code if ( can.route.currentBinding) but that is probably EvilTM
But I suspect you might be trying to solve a problem in a "wrong" way.
qantourisc
@qantourisc
Jul 02 2018 17:00 UTC
How should we use getListData in v3? mydata = getListData; mydata_promise = getListdata; getListData.then( fnc(d){ mydata.replace(d); } ?
qantourisc
@qantourisc
Jul 02 2018 17:27 UTC
can
can.Model / can.model is undefined. Where can I access the legacy definition ?
listData is ran, chrome must optimize it out for some reason.
Chasen Le Hara
@chasenlehara
Jul 02 2018 17:59 UTC
@eben-roux I’m working on getting CanJS 4.3 out the door and canjs.com updated with the latest docs, but in the meantime, you can see more info about that can-bind warning here: https://github.com/canjs/can-bind/blob/master/doc/can-bind.md#can-bind-updatevalue-attempting-to-update
@jeroencornelissen I don’t think can-route keeps track of whether start() has been called… what problem are you trying to solve?
Chasen Le Hara
@chasenlehara
Jul 02 2018 18:05 UTC
Not exactly the same as can-model, but it’s similar
But I think I got can-connect to work so.
Chasen Le Hara
@chasenlehara
Jul 02 2018 18:08 UTC
can.Model / can-connect/can/model/model was removed in v4
qantourisc
@qantourisc
Jul 02 2018 18:08 UTC
I see ;)
Thanks
qantourisc
@qantourisc
Jul 02 2018 18:24 UTC
https://jsbin.com/budamesaki/1/edit?html,js,console,output <= ok desipite the warning, that still works !
Chasen Le Hara
@chasenlehara
Jul 02 2018 18:37 UTC
FYI I don’t think your edits are saving. You might have to go to File > Save snapshot in JS Bin
qantourisc
@qantourisc
Jul 02 2018 18:42 UTC
I am trying to make a helper that reads a value from the scope by argument: function( key, options){ return options.scope.get(key); however it's not updated.}
A thanks chasen. But it's not that important, since they are both "resolved". Atm wondering why the stache helper doesn't update when the value changes.
O it might, just not working.
a yes, the stache is just failing to draw.
Chasen Le Hara
@chasenlehara
Jul 02 2018 18:48 UTC
“stache is just failing to draw” does that mean you see the helper being called as the value changes?
qantourisc
@qantourisc
Jul 02 2018 18:49 UTC
Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '' is not a valid attribute name.
qantourisc
@qantourisc
Jul 02 2018 18:54 UTC
Just a bit of a pita to see why ;)
qantourisc
@qantourisc
Jul 02 2018 19:11 UTC
found
Justin Meyer
@justinbmeyer
Jul 02 2018 19:57 UTC

@/all a 2min video I just made on the View <=> ViewModel relationship within Component: https://www.youtube.com/watch?v=3zMwoEuyX9g&feature=youtu.be

Please share if you like it. If there's places for improvement, please let me know. I'm planning on making it part of a larger CanJS overview video.