Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    15
    Vote Rating
    1
    Zadneram is on a distinguished road

      0  

    Default [4.1.3] Missing dependencies for Ext.data.Model

    [4.1.3] Missing dependencies for Ext.data.Model


    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.1.0
    • Ext 4.1.2
    • Ext 4.1.3

    Browser versions tested against:
    • Firefox 16

    Description:
    • Creating an instance of a class that derives from Ext.data.Model requires both 'Ext.data.reader.Json' and 'Ext.data.writer.Json' by default (as they are the default reader and writer) but these are not required by Ext.data.Model.

    Steps to reproduce the problem:
    • Create an instance of a class that inherits from Ext.data.Model without first loading the JSON reader or writer classes

    The result that was expected:
    • The reader and writer classes are in the list of dependencies for Ext.data.Model

    The result that occurs instead:
    • The reader and writer classes are not in the list of dependencies and Ext.Loader attempts to synchronously load them. This doesn't work when synchronous loading is disabled.
    • In particular, when trying to 'build' and compress our javascript into a single file using the Sencha SDK tools, the reader and writer classes aren't put in the right place in the file, causing our site to fail to load.

    Test Case:

    The following just creates a grid property model (just as a class that inherits from Ext.data.Model). Nothing to see except the warning messages in the console.

    Code:
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Json Reader/Writer Test</title>
    
        <script type="text/javascript" src="/ext4.1.3/ext-dev.js"></script>
    
        <link rel="stylesheet" href="/ext4.1.3/resources/css/ext-all.css" type="text/css">
    
        <script type="text/javascript">
            Ext.require([
                'Ext.data.Model',
                'Ext.grid.property.Property'
            ]);
    
            Ext.onReady(function(){
                Ext.create('Ext.grid.property.Property');
            });
        </script>
    
    </head>
    <body>
    </body>
    </html>

    HELPFUL INFORMATION

    Debugging already done:
    • It looks like this has been a problem prior to 4.1.3 but have only noticed it on upgrading to 4.1.3 so possibly another class was loading the reader and writer previously...
    • Get the following warning in the console (and an equivalent one for the writer):

    [Ext.Loader] Synchronously loading 'Ext.data.reader.Json'; consider adding Ext.require('Ext.data.reader.Json') above Ext.onReady

    Possible fix:
    • Add reader and writer classes to list of dependencies for Ext.data.Model

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The model shouldn't require it, the proxy should. The reader/writer isn't used on the model, it's used on the proxy.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    15
    Vote Rating
    1
    Zadneram is on a distinguished road

      0  

    Default


    Fair point. Can the proxy require the reader/writer then please?

  4. #4
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    796
    Vote Rating
    38
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    This is now fine in 4.2.1.744
    Product Architect
    Altus Ltd.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar