Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    82
    Vote Rating
    2
    sencha-noob is on a distinguished road

      2  

    Default Adding custom configs in class override throws error

    Adding custom configs in class override throws error


    REQUIRED INFORMATION
    Ext version tested:
    • Sencha Touch 2.0.0 commercial
    Browser versions tested against:
    • Chrome 19.0.1061.1 dev
    DOCTYPE tested against:
    • html
    Description:
    • When overriding a class, if you define a config section with new attributes, an error is thrown.
    Steps to reproduce the problem:
    • Override a class
    • Add a custom config
    • Add a constructor that calls parent constructor & initconfig
    The result that was expected:
    • Override class with an additional config, with the appropriate setters & getters
    The result that occurs instead:
    • Error thrown when trying to load - Uncaught TypeError: Cannot read property 'apply' of undefined
    Test Case:
    Code:
    Ext.define("ExamplePanel", {
        override: "Ext.Panel",
    
        config: {
            test: 'a config'
        },
    
        constructor: function(config) {
            this.initConfig(config);
            this.callParent(arguments);
        }
    });


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


    Thanks for the report.
    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 Premium Member
    Join Date
    Feb 2012
    Posts
    82
    Vote Rating
    2
    sencha-noob is on a distinguished road

      0  

    Default


    Can you confirm that this is a bug? Should one be able to define custom config items in an override class?

    Thanks.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Vote Rating
    750
    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


    I opened a bug ticket already. As a developer, I would expect to be able to.
    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.

  5. #5
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    I feel strongly this is blurring the line between an override and a custom class too far, but we'll take a look at it.

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #6
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Duluth, MN
    Posts
    126
    Vote Rating
    4
    badgerb1 is on a distinguished road

      0  

    Default


    Quote Originally Posted by Jamie Avins View Post
    I feel strongly this is blurring the line between an override and a custom class too far, but we'll take a look at it.
    Here's an example of where I'd like to use this.

    I'd like to add a tableName config to the association class so that my SQLite proxy can use it to write the associated data. I can't see a way to extend association and then have the Model use that class when it creates the associations.

    Note: tried addConfig too and it didn't define the set and get methods either.

    What I'll probably end up doing is overriding the Association and in the constructor stick the tableName into a property that will be retrieved.

    Thanks
    Bob

  7. #7
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    434
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      0  

    Default


    +1 I've hit this issue trying to override and add new functionality to Container.
    I don't want to extend as I want the functionality to be available in both container and Panel.

    Any update on when a fix will be available?

  8. #8
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    27
    Vote Rating
    2
    alex.sherwin is on a distinguished road

      0  

    Default


    This would be convenient for something like adding the RowExpander plugin to the grid... Starting out, I assumed I could do this.

    Since I can't, not sure how to do something so simple like use a plugin that isn't built-in to Architect

  9. #9
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Budapest
    Posts
    89
    Vote Rating
    2
    zmagyar is on a distinguished road

      0  

    Default


    I just run into this problem as well. Is there any known workaround?

  10. #10
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    434
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      0  

    Default


    Indications are the bug fix may be released in Touch 2.1

    For now I have extended Sencha classes instead of overriding but I lose the benefit of other subclasses inheriting the functionality.
    You could look at using a mixin to achieve multiple inheirtance

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