Results 1 to 4 of 4

Thread: Ext.util.KeyMap on document

  1. #1
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,790
    Vote Rating
    391
      0  

    Default 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
    Bédoin/Redwood City
    Posts
    30,626
    Vote Rating
    53
      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.
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  3. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,790
    Vote Rating
    391
      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,172
    Vote Rating
    34
      0  

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •