These are chat archives for canjs/canjs

6th
Dec 2016
Christopher Oliphant
@RALifeCoach
Dec 06 2016 12:16
Can you create a component as a class? Does someone have an example of CanJS/stealJS written in ES6 classes?
I am using canjs 3.0 and stealjs 1
Paul Tichonczuk
@tracer99
Dec 06 2016 18:55
Can anyone help me with a can-compile issue we're running into today?
apparently the Grunt task is looking for http://canjs.com/release/2.3.27/can.jquery.js and not finding it. Why is it even going externally?
Kevin Phillips
@phillipskevin
Dec 06 2016 18:56
looks like the site is broken again
http://canjs.com/release/ needs to be restored
Paul Tichonczuk
@tracer99
Dec 06 2016 18:58
why does can-compile even go externally and not use dependancies?
Kevin Phillips
@phillipskevin
Dec 06 2016 18:59
I do not know
Paul Tichonczuk
@tracer99
Dec 06 2016 18:59
sigh.
Kevin Phillips
@phillipskevin
Dec 06 2016 18:59
I know some work needs to be done to update can-compile to work with canjs 3.0
so that should be fixed also at the same time
would you mind putting in an issue?
Paul Tichonczuk
@tracer99
Dec 06 2016 19:00
for this or the site being broken? (or both?)
Kevin Phillips
@phillipskevin
Dec 06 2016 19:00
to use NPM dependencies
we’ll get the site fixed
Paul Tichonczuk
@tracer99
Dec 06 2016 19:00
right. will do
Kevin Phillips
@phillipskevin
Dec 06 2016 19:00
I’ll put in an issue for fixing the site if needed
Paul Tichonczuk
@tracer99
Dec 06 2016 19:03
canjs/can-compile#56
Kevin Phillips
@phillipskevin
Dec 06 2016 19:03
thanks
Paul Tichonczuk
@tracer99
Dec 06 2016 19:04
any idea how long fixing the site would take? We can't do any builds/tests right now.
Kevin Phillips
@phillipskevin
Dec 06 2016 19:07
will definitely be fixed today… exactly how long I’m not really sure
Paul Tichonczuk
@tracer99
Dec 06 2016 19:07
ok. thanks.
Michael Price
@web-mech
Dec 06 2016 19:20
canjs/can-compile#57
Paul Tichonczuk
@tracer99
Dec 06 2016 19:27
@web-mech DOH. I tried that and I swear it didn't work.
sigh
Kevin Phillips
@phillipskevin
Dec 06 2016 19:30
should be working again
Paul Tichonczuk
@tracer99
Dec 06 2016 19:31
thanks
@RALifeCoach I think you are looking for this http://canjs.com/doc/can-construct.html
Gira Minus
@gKreator
Dec 06 2016 19:42
@phillipskevin Was that the reason https://www.npmjs.com/package/can-compile was not compiling since friday?
Paul Tichonczuk
@tracer99
Dec 06 2016 19:59
@gKreator most likely
Gira Minus
@gKreator
Dec 06 2016 19:59
Ok, thanks
Sorry to bother you but could you help me out with this? http://forums.donejs.com/t/canjs-3-2-1-can-compute-map-binding-migrating-from-canjs-2/493 I just need to be pointed in the right direction. Thanks!
Kevin Phillips
@phillipskevin
Dec 06 2016 20:45
@gKreator we released a new version of canjs.com on Friday, which broke can-compile
this was fixed on Sunday
I pushed out a new version of the site again today, which did the same thing
we’ll update the release script so we don’t have to manually fix the releases folder every time
Kevin Phillips
@phillipskevin
Dec 06 2016 20:52
@gKreator wouldn’t you want to use self.task_group.get('task_group_link_support_user')
or just self.task_group.task_group_link_support_user
Gira Minus
@gKreator
Dec 06 2016 20:53
I tried both
Kevin Phillips
@phillipskevin
Dec 06 2016 20:53
ok
let me try it out
instead of guessing
Gira Minus
@gKreator
Dec 06 2016 20:54
blob
here is more of the code so that you can see
Kevin Phillips
@phillipskevin
Dec 06 2016 20:55
ok
Gira Minus
@gKreator
Dec 06 2016 20:55
im messing around right under that with storing Compute in the viewModel and I am having some success to it.
blob
this is working
Gira Minus
@gKreator
Dec 06 2016 21:06
for some reason this is not working, the array gets updated but the final compute does not fire. It fires when i update the number, but the list does not update.
blob
Kevin Phillips
@phillipskevin
Dec 06 2016 21:08
I don’t think using a compute like that is the solution
DefineMap is already going to turn those properties into computes
Gira Minus
@gKreator
Dec 06 2016 21:08
Yeah, I figured. I'm just trying random things at this point.
I think it is the way that I am acessing the viewModel
blob
Kevin Phillips
@phillipskevin
Dec 06 2016 21:12
as long as something is binding on derived property it works
Gira Minus
@gKreator
Dec 06 2016 21:12
the green one is correct and gets updated, while the red one is not updated
Kevin Phillips
@phillipskevin
Dec 06 2016 21:13
can you clone my JSBin and reproduce the issue?
Gira Minus
@gKreator
Dec 06 2016 21:13
if I trigger computeTestUpdate(), it pushes some objects to an array. When i click computeTestUpdate2(), it shows the newly added items in the console.log(). Whule when computeTest gets triggered again after computeTestUpdate2().. it still has the original value.
Kevin Phillips
@phillipskevin
Dec 06 2016 21:14
a simpler example would really help… I’m getting lost in what you’re trying to do
Gira Minus
@gKreator
Dec 06 2016 21:16
In the original example... I need to redraw a list of users once another array is updated so that I can filter out some users
So have 2 lists... 1 is all of the users. the second list is a list of taken users
blob
Kevin Phillips
@phillipskevin
Dec 06 2016 21:22
ok
Gira Minus
@gKreator
Dec 06 2016 21:22
I'm working on a jsbin right now
Kevin Phillips
@phillipskevin
Dec 06 2016 21:22
awesome
this works...
Gira Minus
@gKreator
Dec 06 2016 21:31
blob
Woot, you helped me out! 'compute test' is getting triggered on both 'update 1' and 'update 2'
I think the way I was doing it. Was cloning the original scope or something
Kevin Phillips
@phillipskevin
Dec 06 2016 21:33
hmm, yeah, I’m not sure what happens when you wrap it in a compute like that or just use a function
using getters for derived properties like that is the way to go
Gira Minus
@gKreator
Dec 06 2016 21:34
Yeah, I'm not entierly sure either. It was working on Canjs 2.*... I think one of my friends told me Compute starts a new thread or something so the scope might of got wacked
but yeah thanks this is allot easier, I will update my forum post later once I get the actual code sorted
Kevin Phillips
@phillipskevin
Dec 06 2016 21:35
ok great
Gira Minus
@gKreator
Dec 06 2016 21:49
Thanks again! @phillipskevin
Gira Minus
@gKreator
Dec 06 2016 22:23
One more question, how to updateData on an id that was not requested by can-connect
blob
it was possible in Canjs 2.*
nevermind, I found out
blob