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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    A model can be used by many stores, this is the reason for this change.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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 - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,608
    Vote Rating
    874
      0  

    Default

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

    Thanks.
    Evan Trimboli
    Twitter - @evantrimboli

  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 - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,608
    Vote Rating
    874
      0  

    Default

    Pretty much, yeah. Records tend to be "throwaway" objects, so binding listeners is rather heavy for them.
    Evan Trimboli
    Twitter - @evantrimboli

  7. #7
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,078
    Vote Rating
    184
      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
  •