Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1298 in a recent build.
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Location
    Seattle, WA
    Posts
    2
    Vote Rating
    0
    kleite is on a distinguished road

      0  

    Default Closure

    Closure


    It would appear to me that there might be a closure problem with calling routines with one of the parameters defined as:

    scope: this

    There are several routines that use the statement:

    var me = this;

    And then use 'me' for the scope. That looks like to me to be a proper method to handle closure. Routines like:

    Ext.form.Panel, Ext.field.Select, Ext.TitleBar and many others might have a problem.

    Try scanning the source code with 'scope: this' or just with ': this' (without the quotes) to review all the situations that might need a closure variable.

    Thanks,
    Kris

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


    Ext.form.Panel, Ext.field.Select, and Ext.TitleBar do not accept scope as a config. Can you be more specific with one example?
    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 User
    Join Date
    Nov 2010
    Location
    Seattle, WA
    Posts
    2
    Vote Rating
    0
    kleite is on a distinguished road

      0  

    Default


    For Ext.form.Panel starting at line 217:

    initialize: function() {
    var me = this;
    me.callParent();


    me.on({
    action: 'onFieldAction',
    scope : me
    });


    me.element.on({
    submit: 'onSubmit',
    scope : this <--------------------------
    });
    },


    For Ext.field.Select starting at line 128:

    initialize: function() {
    this.callParent();


    this.getComponent().on({
    scope: this, <-----------------------------------
    masktap: 'onMaskTap'
    });
    },


    For Ext.TitleBar.js starting at line 143:

    this.sizeMonitors = {
    leftBox: new SizeMonitor({
    element: leftBox.renderElement,
    callback: this.refreshTitlePosition,
    scope: this <---------------------------------------
    }),
    spacer: new SizeMonitor({
    element: spacer.renderElement,
    callback: this.refreshTitlePosition,
    scope: this <-----------------------------------------
    }),
    rightBox: new SizeMonitor({
    element: rightBox.renderElement,
    callback: this.refreshTitlePosition,
    scope: this <----------------------------------------
    })
    };

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


    The reason for using

    Code:
    var me = this;
    Is to save space when compiled, nothing more. In Ext.form.Panel, yeah, that does need to be changed. Ext.field.Select it wouldn't save any space as you have to overcome the characters 'var me = this;' introduces. In Ext.TitleBar, there is a great example of a chance to save a few bytes.
    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

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