1. #1
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,616
    Vote Rating
    327
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default Ext.util.KeyMap on document

    Ext.util.KeyMap on document


    Not sure whether this is technically a bug but it is a backwards-compatibility problem I hit.

    In ExtJS 4.0.7 this works:

    Code:
    Ext.create('Ext.util.KeyMap', document, {
        ...
    });
    In 4.1.0-beta-1 that throws an error, I've had to change it to this:

    Code:
    Ext.create('Ext.util.KeyMap', Ext.get(document), {
        ...
    });
    Is there a better way to do this? Note that this code works even when it isn't wrapped in an Ext.onReady, so it isn't equivalent to using the document body.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The new constructor has been standardized to use a single argument as is now standard in ExtJS.

    Use the target: document config in a single config object.

    This class has been around since yui-ext, and that constructor signature really had to change.

    Needs some tweaks to the tests which route it through the legacy constructor to maintain backward compatibility as we must.

  3. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,616
    Vote Rating
    327
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Thanks. Switched my code to target and binding and everything looks a lot healthier for it.

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,119
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    Thanx, this one solved. Then backward compatibility aint good on this point.

Thread Participants: 2