Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2010
    Location
    Atlanta, GA
    Posts
    39
    Vote Rating
    0
    RoyW is on a distinguished road

      0  

    Default [4.1.0] Ext.data.Types.AUTO is missing the convert method

    [4.1.0] Ext.data.Types.AUTO is missing the convert method


    The documentation here
    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Types
    states that types must have 3 properties, convert, sortType and type. In 4.1.0 the AUTO type has no convert method as can be seen by looking at the source
    http://docs.sencha.com/ext-js/4-1/so...-property-AUTO
    I created my own property grid that relied on AUTO having a convert method. I can work around the problem but I don't thing the library should remove code that is supposed to exist.

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


    convert is an option configuration. I don't see where it says it requires them, I see it says devs may add them.
    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
    Ext JS Premium Member SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    544
    Vote Rating
    31
    SebTardif will become famous soon enough SebTardif will become famous soon enough

      0  

    Default Field type AUTO do not have convert method but Field constructor expect it

    Field type AUTO do not have convert method but Field constructor expect it


    Field type AUTO do not have convert method but Field's constructor expect it.

    Error is: this.type.convert is not a function Line 37449 on ext-all-debug.js Ext JS 4.1 Release

    Extract from: http://docs.sencha.com/ext-js/4-1/so...-property-AUTO
    Code:
    Ext.define('Ext.data.Types', 
    {     singleton: true,     requires: ['Ext.data.SortTypes'] }, function() {     var st = Ext.data.SortTypes;      Ext.apply(Ext.data.Types, 
    {         /**          
    * @property {RegExp} stripRe          
    * A regular expression for stripping non-numeric characters from a numeric value. Defaults to <tt>/[\$,%]/g</tt>.          
    * This should be overridden for localization.          
    */         stripRe: /[\$,%]/g,         
     /**          * @property {Object} AUTO         
     * This data type means that no conversion is applied to the raw data before it is placed into a Record.          */         
    AUTO: {             sortType: st.none,             type: 'auto'         },
    
    ...
    
    Ext.define('Ext.data.Field', {     requires: ['Ext.data.Types', 'Ext.data.SortTypes'], 
        alias: 'data.field', 
         
        constructor : function(config) { 
            if (Ext.isString(config)) { 
                config = {name: config}; 
            } 
            Ext.apply(this, config); 
             
            var types = Ext.data.Types, 
                st = this.sortType; 
     
            if (this.type) { 
                if (Ext.isString(this.type)) { 
                    this.type = types[this.type.toUpperCase()] || types.AUTO; 
                } 
            } else { 
                this.type = types.AUTO; 
            } 
     
             
            if (Ext.isString(st)) { 
                this.sortType = Ext.data.SortTypes[st]; 
            } else if(Ext.isEmpty(st)) { 
                this.sortType = this.type.sortType; 
            } 
     
             
            if (!config.hasOwnProperty('convert')) { 
                this.convert = this.type.convert; 
            } 
             
             
             
             
            else if (!this.convert && !config.hasOwnProperty('defaultValue')) { 
                this.defaultValue = this.type.convert(this.defaultValue); 
            } 
        },

  4. #4
    Ext JS Premium Member SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    544
    Vote Rating
    31
    SebTardif will become famous soon enough SebTardif will become famous soon enough

      0  

    Default


    Line:
    this.defaultValue = this.type.convert(this.defaultValue);At: http://docs.sencha.com/ext-js/4-1/so...ld-cfg-convert

    Can be called against AUTO, so ExtJS 4.1 Release code believe all Type should have convert, including AUTO.

  5. #5