1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    12
    Vote Rating
    0
    Brett89 is on a distinguished road

      0  

    Default [Bug] Sencha compile not including classes when creating with alias

    [Bug] Sencha compile not including classes when creating with alias


    After compiling, I am receiving the following errors in my code:


    Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: series.pie
    Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: series.column

    I am defining my charts using aliases for both series and axes:


    Code:
    series: [
        {
            type: 'column',
            ...
        }
    ]
    When I change to this method of creating the series:

    Code:
    series: [
        Ext.create('Ext.chart.series.Column', {
            ...
        })
    ]
    and then compile again, the series errors are gone, and I am getting:

    Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: axis.numeric

    It appears the compile is not including classes when they are created using aliases.

    I am using v3.0.0.250 on windows

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,047
    Vote Rating
    850
    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


    You shouldn't use Ext.create outside of a function like that
    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
    Oct 2011
    Posts
    12
    Vote Rating
    0
    Brett89 is on a distinguished road

      0  

    Default


    That's not how I'm doing it. I was just demonstrating that if I did use that method, the compiler included the correct files.

  4. #4
    Sencha User
    Join Date
    Jan 2013
    Location
    Hamburg
    Posts
    1
    Vote Rating
    0
    shekoff is on a distinguished road

      0  

    Default The same with me

    The same with me


    Hello,
    I'm in exact same situation using charts .

    Any news here ?
    For details I have prepared self contained example . Please see test.zip attached.
    Just "ext" and "resources" folders are missing to keep file small .

    Best Regards shekoff


    Just needed to add :
    Ext.require('Ext.chart.Chart');
    Ext.require('Ext.chart.series.Column');
    Ext.require('Ext.chart.axis.Numeric');
    Ext.require('Ext.chart.axis.Category');
    and it is working as expected !
    Attached Files

  5. #5
    Sencha User
    Join Date
    May 2010
    Location
    Sapiranga, Rio Grande do Sul, Brazil
    Posts
    77
    Vote Rating
    1
    sergiomichels is on a distinguished road

      0  

    Default


    Same here. It seems that SDKTOOLS-157Sencha Cmd does not auto-detect xtype/xclass dependencies isn't fixed for all the xtypes.

    This bug was fixed in 3.0.0 Beta 2.
    http://cdn.sencha.com/cmd/3.1.2.342/release-notes.html

  6. #6
    Sencha User
    Join Date
    Apr 2010
    Location
    Orlando, Fl
    Posts
    8
    Vote Rating
    0
    sobbayi is on a distinguished road

      0  

    Default


    This bug seems to have reappeared in Sencha Cmd v4.0.0.203