1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    11
    Vote Rating
    0
    Josh LOL is on a distinguished road

      0  

    Default BUG - [Ext 4.1 B3] Ext.class config pre processor behaviour change

    BUG - [Ext 4.1 B3] Ext.class config pre processor behaviour change


    I've noticed a change in behavior from 4.0.7 to 4.1.0 B3 relating to the class 'config' property. Originally when a config property and initial value was defined in a class, that initial value would be applied directly to the object when the class was instantiated. As of 4.1.0 B3 the internal setter functions are instead used to apply the value.

    Is this an intentional change of behavior? If so, is there any 'official' way we can prevent this behaviour?

    The following is a short example demonstrating the differences.

    Code:
    Ext.define('MyObj', {
        config : {
            visible : true
        },
    
        constructor: function(config) {
            this.callParent(arguments);
        },
    
        setVisible : function(visible) {
            this.visible = visible;
            console.log('visibility changed');
        }
    });
    
    Ext.onReady(function() {
        var myObj = Ext.create('MyObj', {});
        console.log(myObj.getVisible());
    });
    If run under 4.0.7 the console output will read:
    Code:
    true
    If run under 4.1.0 B3 then the console will read:
    Code:
     visibility changed
    true

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,230
    Vote Rating
    114
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    The reason for this change (see also http://www.sencha.com/forum/showthre...29-API-Changes) is that even the default value for a config can require transformation and hence needs to pass through the setter.
    Last edited by dongryphon; 2 Mar 2012 at 12:25 AM. Reason: typo
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    11
    Vote Rating
    0
    Josh LOL is on a distinguished road

      0  

    Default


    Ah thanks, it appears the answer I was looking for was hiding in plain sight.

    It looks like this will require some reworking at my end.

Thread Participants: 1

Tags for this Thread

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