by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 08 12:57
    trimentor starred canjs/canjs
  • Aug 07 19:43

    cherifGsoul on 5.x-legacy

    Can5 YouTube terms of service (… (compare)

  • Aug 07 19:43
    cherifGsoul closed #5503
  • Aug 07 19:39

    cherifGsoul on can4-youtube-terms-services

    Can4 YouTube terms of service (compare)

  • Aug 07 19:34
    cherifGsoul opened #5503
  • Aug 07 19:33

    cherifGsoul on add-youtube-policy-notice-for-v5

    Can5 YouTube terms of service (compare)

  • Aug 07 18:37

    cherifGsoul on add-youtube-terms-of-service

    (compare)

  • Aug 07 18:37

    cherifGsoul on master

    Add youtube and google terms of… (compare)

  • Aug 07 18:37
    cherifGsoul closed #5502
  • Aug 07 18:28
    cherifGsoul review_requested #5502
  • Aug 07 18:28
    cherifGsoul opened #5502
  • Aug 07 18:28

    cherifGsoul on add-youtube-terms-of-service

    Add youtube and google terms of… (compare)

  • Aug 05 19:54

    cherifGsoul on master

    Update dist for release (compare)

  • Aug 05 19:54

    cherifGsoul on v6.6.0

    Update dist for release 6.6.0 (compare)

  • Aug 05 19:40

    cherifGsoul on update-can-type-115

    (compare)

  • Aug 05 19:40

    cherifGsoul on master

    Update can-type to 1.1.5 (#5501) (compare)

  • Aug 05 19:40
    cherifGsoul closed #5501
  • Aug 05 19:14
    cherifGsoul opened #5501
  • Aug 05 19:13

    cherifGsoul on update-can-type-115

    Update can-type to 1.1.5 (compare)

  • Aug 05 19:10

    cherifGsoul on update-youtube-logo

    (compare)

DaveO
@DaveO-Home
Yes
Gira Minus
@gKreator
but can.Control does not work?
DaveO
@DaveO-Home
let me check on component
I don't explicitly use can.component
Gira Minus
@gKreator
Umm want to send me your source code? It would help me debug this allot quicker.
DaveO
@DaveO-Home
Here's the steal... steal("app",
"alert",
"helpers",
"underscorestring",
"can/control",
"can/map/define",
"can/construct/super",
function (App, Alert, Helpers, S, Control) {
_.mixin(S.exports());
console.log("Control="+Control);
console.log("Control.extend="+Control.extend);
return Control.extend({
init: function (element, options) {
this._super(element, options);
}
Gira Minus
@gKreator
run
console.log(Control);
instead of
console.log("Control="+Control);
so you can actually see the object itself rather then the typeof
also try
can.Control.extend
rather then Control.extend
DaveO
@DaveO-Home
Actually I did run console.dir but couldn't do a select all
Gira Minus
@gKreator
blob
This was from one of my projects where I used requireJs to load canjs2
I use es6 imports now
blob
with canjs3
DaveO
@DaveO-Home
This was working before 3.4.1... I can live with can-control but something is wrong with can/control
Gira Minus
@gKreator
this is kinda why you should define each on manually so that you have version control
because similar things have happened to me where they push an update with a bug
blob
I would try to mimic this core as close as possible https://github.com/donejs/bitballs/tree/master/public
DaveO
@DaveO-Home
The dependency in can/package.json for control is "can-control": "3.0.5",
Is ES6 now replacing steal?
Gira Minus
@gKreator
not necessarily, steal just works with es6 and es6 is easier then amd
than*
DaveO
@DaveO-Home
can I mix define() with steal() in the same .js file?
Gira Minus
@gKreator
I've never tried that
unless you mean when importing then yes
DaveO
@DaveO-Home
Actually, I meant import xxx from..... and steal().
Gira Minus
@gKreator
Yeah, stealjs lets you import from multiple package formats
DaveO
@DaveO-Home
You got an example
Gira Minus
@gKreator
Umm its just standard importing
DaveO
@DaveO-Home
Thanks, the stack traces from steal-tools are annoying, however....
Gira Minus
@gKreator
Yeah they hardly help
Chasen Le Hara
@chasenlehara
Hi @DaveO-Home, thanks for reporting the issue with can/control/ not working correctly.
I just filed an issue for it: canjs/canjs#3023
It looks like it should be an easy fix (unless I’m missing something 😬).
lmagarian
@lmagarian
I'm trying to use this code but it doesn't work: {(list)}="fields parentId"
fields is a function on the viewModel and parentId is a parameter I want to pass to that function
what's the right way to do this?
Kevin Phillips
@phillipskevin
{(list)}=“fields(parentId)”
Kevin Phillips
@phillipskevin
the way you had it should work also, except that parentId would be a compute and not the actual value
which is probably not what you want
lmagarian
@lmagarian
thanks @phillipskevin
Kevin Phillips
@phillipskevin
:thumbsup: no problem!
Viktor Busko
@Lighttree

guys, I have a component's viewModel that contains object with an array of objects. So it's like

period: {
    prop1: ...,
    prop2: ...,
    myList: [
        {},
        {},
        ...
   ]
}

Define plugin automatically converts 'period' to can.Map, 'myList' to can.List, and its items to another can.Maps.
Is there a good way to 'Define' behavior of inner maps ? (elements of 'myList').
Basically I need to do some formatting and get/set in Define might be useful.

Chasen Le Hara
@chasenlehara
Hi @Lighttree, it looks like you’re using CanJS 2, is that correct?
You can create a can.List type and then set its Map type so objects get converted into specific types: https://v2.canjs.com/docs/can.List.Map.html
That’s a little confusing so if it doesn’t make sense, you could create a JS Bin with your view model and we can provide some advice. 🙂