Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default Beta1 - Custom config items not applied to Component

    Beta1 - Custom config items not applied to Component


    I am not sure if this is a bug or a design change, but it certainly seems like a major breaking change.
    Traditionally Ext and Touch used to apply a Component's config to the Component itself, e.g.:

    Code:
    new Ext.Panel({
      title: 'My title',
      customKey: customVal
    });
    After instantization, both title and customKey fields were available on Panel directly.

    Touch 2 Preview releases changed the config behavior where configuration is applied with an underscore which I understand is a private detail, and one should use getters/setters to access the config option.

    But custom values were still applied to the component directly, so customKey was still available on Ext.Panel. This seems to have changed in Beta 1 and customKey is no longer applied to a component, its only available through initialConfig.

    This potentially is a major breaking change that can a very large portion of codebase built on Touch (it has certainly done so for mine).

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    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


    This will work with deprecation included though it is not something we encourage. You can always check the config object for these properties if you need to use them.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default


    I think I understand (and even agree with you) on that count Jamie. But this is something Ext and Touch (and basically javascript based development) had encouraged for a long time. In my case alone, I am staring at tens of thousands of broken lines of code due to this issue.

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    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


    Does this work with compatibility turned on?

    Sencha Inc

    Jamie Avins

    @jamieavins

  5. #5
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default


    Hi Jamie, I am not turning on the compatibility in an attempt to make my code forward compatible with upcoming changes.
    I have been able to workaround this with some custom code that I would post for others to use.

Thread Participants: 1