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
    770
    Vote Rating
    28
    Steffen Hiller will become famous soon enough 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
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    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


    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
    ________________
    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.

Thread Participants: 1