-
24 Dec 2011 8:03 AM #1
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:
In 4.1.0-beta-1 that throws an error, I've had to change it to this:Code:Ext.create('Ext.util.KeyMap', 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.Code:Ext.create('Ext.util.KeyMap', Ext.get(document), { ... });
-
24 Dec 2011 8:55 AM #2
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.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
24 Dec 2011 9:28 AM #3
Thanks. Switched my code to target and binding and everything looks a lot healthier for it.
-
27 Dec 2011 5:21 AM #4Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
Thanx, this one solved. Then backward compatibility aint good on this point.


Reply With Quote