1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    San Francisco, California
    Posts
    3
    Vote Rating
    0
    demonicus is on a distinguished road

      0  

    Default Unanswered: Ext.data.Model static load method?

    Unanswered: Ext.data.Model static load method?


    Talking about this: http://docs.sencha.com/touch/2-0/#!/...ic-method-load

    Is there a reason why this method is static only?

    I can see a lot of uses for loading the model content after the model has been instantiated. Ie. re-using the model for purposes like "current object" where you have the view bound to one model that has already been instantiated and you could just change the id-field for the model and ask it to load it again.

    Yeah yeah, I could very easily do own model with that kind of behavior, but I was just curious why the method that already exists, couldn't be on the instance-side as well?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,710
    Vote Rating
    436
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    If it wasn't static then the load method would be on the prototype
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    San Francisco, California
    Posts
    3
    Vote Rating
    0
    demonicus is on a distinguished road

      0  

    Default


    Yeah, that's how Javascript works. That wasn't really the question..

  4. #4
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,941
    Vote Rating
    6
    Answers
    29
    edspencer has a spectacular aura about edspencer has a spectacular aura about edspencer has a spectacular aura about

      0  

    Default


    Seems like a pretty reasonable suggestion, though I think it would only really become useful when we have a stronger concept of data binding outside the existing DataView implementation. Definitely something we can add in a future minor release
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer