These are chat archives for canjs/canjs

Mar 2017
Mar 08 2017 00:54 UTC
I'm getting this error: Error: TypeError: Cannot redefine property: _instanceDefinitions
at Function.defineProperty (<anonymous>)
at defineConfigurableAndNotEnumerable (can-define.js:32)
at DefineMap.define.setup (can-define.js:712)
at DefineMap.setup (map.js:113)
at Function.newInstance (can-construct.js:289)
at DefineMap.init (can-construct.js:594)
at new DefineMap (eval at <anonymous> (can-construct.js:NaN), <anonymous>:3:32)
at Object.observable (can-define.js:818)
at Object.eval (can-define.js:708)
at each (each.js:39)
From this code: Message.get({ "id": messageId })
What does it mean, and how do I fix it?
Frank Lemanschik
Mar 08 2017 09:17 UTC
it means you should post a issue fully described in can-define project on github
i guess
and befor that search for existing issues
Jeroen Cornelissen
Mar 08 2017 12:25 UTC
@justinbmeyer What does calling destroyedInstancedo? I expected that it would remove my item from the list, but it doesn’t.
I’ve set up a jsbin with how I thought it would work. See the removeAllItems function.,js,output
Kevin Phillips
Mar 08 2017 14:33 UTC
@lmagarian what does Message look like?
@jeroencornelissen I think you just want destroy
Jeroen Cornelissen
Mar 08 2017 15:14 UTC
@phillipskevin no that would result in additional backend requests. I would like to prevent that from happening.
Kevin Phillips
Mar 08 2017 15:15 UTC
Oh, ok. Sorry. I remember now what you’re trying to do.
don’t you have to make those requests at some point? in order for the items to be deleted on the server.
Jeroen Cornelissen
Mar 08 2017 15:27 UTC
inside Item.List i have a function called destroyList that does that (as suggested by Justin)