These are chat archives for canjs/canjs

2nd
Apr 2015
Gerard Finnerty
@halcyonandon
Apr 02 2015 00:42
so can/util/can became can/util/library?
Matthew Phillips
@matthewp
Apr 02 2015 01:09
no
there's still a can/util/can
Justin Meyer
@justinbmeyer
Apr 02 2015 01:09
can/util/can is different than can/util/util (or can/util/library)
can/util/can mostly creates can = {}
and a few functions that can/util/jquery and friends will never add
like can.__reading, can.import, etc
can/util/util (or can/util/library) is mostly an empty module that is used to map to one of the library modules
Matthew Phillips
@matthewp
Apr 02 2015 01:11
i don't think can/util/library is needed any more
Gerard Finnerty
@halcyonandon
Apr 02 2015 01:43
I got v2.2.2 via bower and canjs/amd/can/util/library.js exists but canjs/amd/can/util/can.js no longer exists for me
Justin Meyer
@justinbmeyer
Apr 02 2015 16:38
@daffl can you take a look at this for 2.2.3
dylanrtt
@dylanrtt
Apr 02 2015 18:03
define_test.js just shows nested define using "value"... is there anyway to use it with "Value" like to essentially define new models on the fly?
dylanrtt
@dylanrtt
Apr 02 2015 18:25
oops, I think I meant I want to use "Type" instead of "Value" for when a value is already provided and I want to pass through a constructor... but I don't think that works either
Alexis Abril
@alexisabril
Apr 02 2015 20:34
lazycan: Did {{#is}} make it into 2.2?
looks like it did :)
Matthew Phillips
@matthewp
Apr 02 2015 20:38
it's #eq i believe
Alexis Abril
@alexisabril
Apr 02 2015 20:41

eq is an alias for is atm

oh wow, lol, forgot this was markdown
Matthew Phillips
@matthewp
Apr 02 2015 20:42
i didn't know that nice
Alexis Abril
@alexisabril
Apr 02 2015 20:52
thought check: I’m writing a quick pattern for wrapping up an existing model with some viewmodel characterstics, toggle show/hide, etc(stuff that the model doesn’t care about)
Domain = can.Model.extend({});

ViewModelDomain = Domain.extend({
    define: {
        showChildren: {
            value: true,
            serialize: function() {}
        }
    }
});
inheritance vs wrapping I guess is my question; any preference either way?
Matthew Phillips
@matthewp
Apr 02 2015 20:54
if the parent has defines they will be overwritten
but to your question, inheritance would be my preference here.
Gerard Finnerty
@halcyonandon
Apr 02 2015 21:07
It is #is, I just started using it myself yesterday and got rid of the helper I made previously
Alexis Abril
@alexisabril
Apr 02 2015 21:07
yeah, good call matt
David Luecke
@daffl
Apr 02 2015 21:59
@halcyonandon That is indeed a build problem. can/util/library will be back in 2.2.3. can/util/can is now in can/can due to build restrictions. This is what is used internally but if you are loading it explicitly you might have to map it.
Nevermind, can/util/can is back as well
Alexis Abril
@alexisabril
Apr 02 2015 22:45
Do we not allow inheriting static methods on a model, such as parseModels? findAll/One seem to be working(I haven’t dug into this yet)