Results 1 to 7 of 7

Thread: Ext.data.Model missing store property

  1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    20
    Vote Rating
    1
      0  

    Default Ext.data.Model missing store property

    The store property is a documented property of Ext.data.Model and as such can be relied upon for customer use. It was not present in the 4.1 alpha release and was reported at that time. It is also not present in the 4.1 beta release. It seams to be replaced with a stores property which appears to be an array containing 1 element.

    I have not seen mention of this in any 4.1 release documentation or backward compatability guide. If I missed it my apology and please point me to it.

    In the mean time can I rely on stores being an array with the first element pointing back to the store?

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    A model can be used by many stores, this is the reason for this change.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2008
    Posts
    20
    Vote Rating
    1
      0  

    Default

    Umm, ok. So we have an undocumented breaking change caused by undocumented new features. Can you see where I might be going with this?

    If this were an isolated case I wouldn't even blink but this has been an on going issue for quite some time. You guys need to step up to the plate. Wild west software development (seemed to start some time after version 2) needs to be a thing of the past. Think documentation, compatability, customers, unit testing, testing of any kind, etc....

  4. #4
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,987
    Vote Rating
    934
      0  

    Default

    This was an oversight, I've updated the API changes page here: http://www.sencha.com/forum/showthre...29-API-Changes

    Thanks.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #5
    Sencha User ykey's Avatar
    Join Date
    Mar 2010
    Location
    USA
    Posts
    245
    Vote Rating
    28
      0  

    Default

    It isn't obvious to me looking at the source why a model needs to know what stores it is associated with. Is it just to reduce the number of observable listeners between models and stores?

  6. #6
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,987
    Vote Rating
    934
      0  

    Default

    Pretty much, yeah. Records tend to be "throwaway" objects, so binding listeners is rather heavy for them.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  7. #7
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,138
    Vote Rating
    189
      0  

    Default

    Will there be a compat layer for 4.1? Should be easy to set

    Code:
    this.store=this.stores[0];
    to solve bw compat. Don't think users will appreciate another release with breaking api changes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •