Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 18 22:20
    greenkeeper[bot] labeled #5391
  • Oct 18 22:20
    greenkeeper[bot] opened #5391
  • Oct 18 22:20

    greenkeeper[bot] on can-observable-mixin-1.0.3

    fix(package): update can-observ… (compare)

  • Oct 18 19:08
    cherifGsoul labeled #5390
  • Oct 18 19:07
    cherifGsoul opened #5390
  • Oct 18 18:45
    greenkeeper[bot] labeled #5389
  • Oct 18 18:45
    greenkeeper[bot] opened #5389
  • Oct 18 18:45

    greenkeeper[bot] on can-observable-bindings-1.3.0

    fix(package): update can-observ… (compare)

  • Oct 18 18:29

    matthewp on master

    Update dist for release (compare)

  • Oct 18 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • Oct 18 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • Oct 18 17:59

    matthewp on master

    fix(package): update can-observ… Merge pull request #5388 from c… (compare)

  • Oct 18 17:59
    matthewp closed #5388
  • Oct 18 16:46
    greenkeeper[bot] labeled #5388
  • Oct 18 16:46
    greenkeeper[bot] opened #5388
  • Oct 18 16:46

    greenkeeper[bot] on can-observable-array-1.0.2

    fix(package): update can-observ… (compare)

  • Oct 18 12:45
    greenkeeper[bot] labeled #5387
  • Oct 18 12:45
    greenkeeper[bot] opened #5387
  • Oct 18 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

    fix(package): update can-stache… (compare)

  • Oct 18 09:49
    chasenlehara edited #5384
Frank Lemanschik
@frank-dspeed
thats what i mean they are still updated but not used any more
Kevin Phillips
@phillipskevin
the donejs examples will be updated to use DefineMap, yeah
Frank Lemanschik
@frank-dspeed
they get replaced by the lazy models
Kevin Phillips
@phillipskevin
and generators, etc
Frank Lemanschik
@frank-dspeed
ya thats what i mean :)
Gregg Roemhildt
@roemhildtg
Okay, but I can provide a default value still, its just this doesn't call the set method anymore?
Frank Lemanschik
@frank-dspeed
i depricated it and throw it out all over
Oh @phillipskevin do you maybe know or tryed it what happens to a 2.3 project when you switch do can3.0
and use the legacy stuff does it work?
Kevin Phillips
@phillipskevin
yes
Frank Lemanschik
@frank-dspeed
so we are compatible wow
Kevin Phillips
@phillipskevin
yeah, we have client projects that are upgrading to 3.0
Frank Lemanschik
@frank-dspeed
don't knowed that fact should consider that in the genrator
ya upgrading means for me also changing the components
i mean it works to only change the requires and imports and they still work nothing left out?
Kevin Phillips
@phillipskevin
no, you do have to make some changes
@roemhildtg to answer your question… I’m not sure
Gregg Roemhildt
@roemhildtg
I've been doing the future proof migration, its not so bad. It cleans up the code a lot removing all of the .attr stuff
Kevin Phillips
@phillipskevin
I don’t think setting a default value on DefineMap like that does what you want
Gregg Roemhildt
@roemhildtg
Okay just thought I'd ask. I do know that in the previous version set would be called when the default value was set. http://jsbin.com/wicuguwisa/edit?html,js,console,output
Kevin Phillips
@phillipskevin
yeah
there are some differences with the order of how the define properties get set up
if that’s something you need, feel free to open an issue
Frank Lemanschik
@frank-dspeed
@phillipskevin do you have a idea what happens to such?
Kevin Phillips
@phillipskevin
not sure what you mean
Frank Lemanschik
@frank-dspeed

canMap.extend(
/ @prototype */
{
define: {
/

     * @property {office/models/session} office/components/navigation.loginSession loginSession
     * @parent office/components/navigation.properties
     *
     * A placeholder session with a nested [office/models/user user] property that
     * is used for two-way binding the login form's username and password.
     */
    loginSession: {
        value: function(){
            return new Session({user: new User()});
        }
    }
    /**
     * @property {office/app} office/components/navigation.app app
     * @parent office/components/navigation.properties
     *
     * The [office/app] used to add or destroy the session.
     */
     /**
      * @property {Promise<office/models/session>} office/components/navigation.sessionPromise sessionPromise
      * @parent office/components/navigation.properties
      *
      * The promise that resolves when the user is logged in.
      */
},
/**
 * @function createSession
 *
 * Creates the session on the server and when successful updates [office/components/navigation.app]
 * with the session. Sets [office/components/navigation.sessionPromise].
 * @param {Event} [ev] Optional DOM event that will be prevented if passed.
 */
createSession: function(ev){
    if(ev) {
        ev.preventDefault();
    }
    var self = this;
    var sessionPromise = this.attr("loginSession").save().then(function(session){

        self.attr("loginSession", new Session({user: new User()}));
        self.attr("app").attr("session", session);

    });
    this.attr("sessionPromise", sessionPromise);
},

```

you see we have a map and then define:{}
and functions under the define
Gregg Roemhildt
@roemhildtg
Okay, good to know. I think its useful. I'll put in an issue.
Kevin Phillips
@phillipskevin
@frank-dspeed yeah… that’s how can-map and can-map-define work
you can have a CanMap without the define plugin
Frank Lemanschik
@frank-dspeed
i mean
var DefineMap = require("can-define/map/map");
in this case it should only set the define: {} part
not the functions after it right?
whats the component for the functions in can map after the define
Kevin Phillips
@phillipskevin
you can put functions on a DefineMap
those functions can be called from other properties on the map or from the template
inside the define: {}, the define plugin will take the set, get, etc properties and create a compute on the Map instance
outside the define, those things will just be set on the Map instance directly
Frank Lemanschik
@frank-dspeed
ah
so we have magic that exports it from define to parent map
good to know
Kevin Phillips
@phillipskevin
yeah
that’s what can-map-define does
Frank Lemanschik
@frank-dspeed
it defines a map :)
sounds logical
i am so lost in the nodejs parts of the project at present that i lost totally the view for the web component evolution :)
Justin Meyer
@justinbmeyer