These are chat archives for canjs/canjs

11th
Dec 2016
Thomas Sieverding
@Bajix
Dec 11 2016 01:36
@frank-dspeed the issue is that get doesn’t do what it’s intended to do, not that there isn’t something that does
Thomas Sieverding
@Bajix
Dec 11 2016 01:47
The test uses can-define/map/
Frank Lemanschik
@frank-dspeed
Dec 11 2016 12:42
hmmm i am wondering because i did a lot of stuff with it and never runned into that
Per Ehnbom
@perehnbom
Dec 11 2016 14:43
I have created an issue for the destroy problem in DefineMap: canjs/canjs#2878
Frank Lemanschik
@frank-dspeed
Dec 11 2016 14:45
sounds for me as you should use can-define lists
shouldnt you?
@perehnbom
Per Ehnbom
@perehnbom
Dec 11 2016 14:51
I am: Item.List = can.DefineList.extend
Frank Lemanschik
@frank-dspeed
Dec 11 2016 14:51
but you sayed you using map
your adding a can-define list to a can-define map?
Per Ehnbom
@perehnbom
Dec 11 2016 14:52
yes, as a property. Typical exampel is a model which contains a list of other models
var Project = can.DefineMap.extend({
items : {
Type : Item.List
}
})
Frank Lemanschik
@frank-dspeed
Dec 11 2016 14:53
hmmm i get maybe a bit confused because it looks like your using can.all
normaly you should use the modules indipendent
Per Ehnbom
@perehnbom
Dec 11 2016 14:54
you mean in the js bin?
Frank Lemanschik
@frank-dspeed
Dec 11 2016 14:55
i would do something like var myMap = require('can-define/map/map')
myList = equire('can-define/list/list')
it could be possible that it only not working because your using it in a jsbin or where do you code? are you using steal?
Per Ehnbom
@perehnbom
Dec 11 2016 14:56
no, webpack, but it shouldnt matter how the modules are imported. the github example that I posted is more extensive
this is the none working code?
Per Ehnbom
@perehnbom
Dec 11 2016 14:57
yes, that's the js bin
the github example is here :https://github.com/perehnbom/tryout-canjs3
Frank Lemanschik
@frank-dspeed
Dec 11 2016 14:58

and the fail is that in Items as seperate list

Item 1 gets removed?

can you add comments to your jsbin
Per Ehnbom
@perehnbom
Dec 11 2016 14:59
sure, Ill do that
Frank Lemanschik
@frank-dspeed
Dec 11 2016 14:59
so i understand what it is doing or what you expect to get
it would be enought if i would find the place that you call none working
:D
because i see a rendered list
Per Ehnbom
@perehnbom
Dec 11 2016 15:08
Ive updated with comments
what should happen is that an item should be removed from each list
Frank Lemanschik
@frank-dspeed
Dec 11 2016 15:47
ah
and it happens only on one list the middel seperated one right
Per Ehnbom
@perehnbom
Dec 11 2016 15:48
yes