Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    753
    Vote Rating
    20
    Steffen Hiller will become famous soon enough

      0  

    Default [2.1] Overriding singleton not working

    [2.1] Overriding singleton not working


    I'm getting the same error as in this bug report from March which was reported as fixed:
    http://www.sencha.com/forum/showthread.php?185360

    Error:
    Uncaught TypeError: Object [object Object] has no method 'override'
    File: sencha-touch.js:6597
    Line: this.get(overriddenClassName).override(data);

    Test case:
    Code:
    Ext.define('App.override.util.Format', {
        override: 'Ext.util.Format'
    });
    My work around for now:
    Code:
    Ext.define('App.override.util.Format', {
    }, function () {
        var date_without_override = Ext.util.Format.date;
        
        Ext.util.Format.date = function (value, format) {
            ... // my override code
            
            return date_without_override(value, format);
        };
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    That post wasn't marked as fixed, it was closed due to this statement from Jamie:

    Quote Originally Posted by Jamie Avins View Post
    Thank you for the report. You should be able to just directly change that singleton instance as a workaround until we resolve that.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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