[CLOSED] Compatibility issue [DEPRECATED][4.0][KeyMap]: Ext.KeyMap has been deprecated, use Ext.util.KeyMap.

  1. #1

    [CLOSED] Compatibility issue [DEPRECATED][4.0][KeyMap]: Ext.KeyMap has been deprecated, use Ext.util.KeyMap.

    Hello.

    I included the compatibility layer in my project to correct my scripts. I am receiving dozens of errors "[DEPRECATED][4.0][KeyMap]: Ext.KeyMap has been deprecated, use Ext.util.KeyMap.". All these error are occured in the scripts, which are generated by Ext.Net.

    Is this acceptable?
    Last edited by Daniil; Sep 04, 2012 at 12:37 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please clarify what Ext.NET version do you use?

    I was unable to reproduce this error online:
    https://examples2.ext.net/#/Keys/Key...egions_Toggle/
    and using the same v2.1 example.
  3. #3
    I am using Ext.Net 2.1. Also I included in my project 2 files from the compatibility pack (ext3-core-compat.js and ext3-compat.js from http://cdn.sencha.io/ext-3-to-4-migration-pack.zip). These 2 files generates this error.

    Let me know if you need more information.

    Best regards.
  4. #4
    Ok, thanks for the clarification.

    Well, I think it just alerts to use Ext.util.KeyMap instead of Ext.KeyMap to avoid a breakage after removing these compatibility scripts. It should not be a real error, it should be just a warning.

    Probably, we use Ext.KeyMap somewhere in Ext.NET. It should be replaced with Ext.NET. I was unable to reproduce this "deprecated" warning using my test case. Could you provide a sample? At least, a code snippet where you use KeyMap. It will allow us to quickly find where we use Ext.KeyMap.
  5. #5
    Yes it is a warning message. Sorry for misleading you. Find the sample below. The warnings are appeared on page load. Also there are aditional warnings, when I try to exapnd combo boxes.

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    	<script src="Scripts/ext3-core-compat.js" type="text/javascript"></script>
    	<script src="Scripts/ext3-compat.js" type="text/javascript"></script>
    </head>
    <body>
        <form id="form1" runat="server">
    		<ext:ResourceManager ID="ResourceManager1" runat="server" />
    
    		<ext:FormPanel runat="server">
    			<FieldDefaults>
    				<CustomConfig>
    					<ext:ConfigItem Name="LabelWidth" Value="120" Mode="Raw" />
    				</CustomConfig>
    			</FieldDefaults>
    			<Items>
    				<ext:ComboBox runat="server" Width="225" FieldLabel="Combo without container" />
    				<ext:FieldContainer runat="server" FieldLabel="Combo in container">
    					<Items>
    						<ext:ComboBox ID="ComboBox1" runat="server" Width="100" />
    					</Items>
    				</ext:FieldContainer>
    			</Items>
    		</ext:FormPanel>
    	</form>
    </body>
    </html>
  6. #6
    Thank you.

    I think it is a bug within the compatibility scripts.

    I just debugged, it throws these deprecation messages on this line:
    map = me.map = new Ext.util.KeyMap(keymapCfg);
    Also these compatibility scripts looks old.

    I see "Updated May 27, 2011" here:
    http://www.sencha.com/forum/showthre...to-4-Migration

    and "Updated October 10, 2011" here:
    http://www.sencha.com/products/extjs/download/

    Seems they just forgot to update the second first date, but, anyway, it is rather old.

    According the dates I assume it is for ExtJS 4.0. Currently, Ext.NET v2.1 uses ExtJS 4.1.1.

    However, I think you can still use these compatibility scripts, they are helpful. Just there is a possibility to get some wrong or not complete output according the difference between ExtJS 4.0 and 4.1.1.

    Also your report leaded me to find "Ext.KeyNav" in our scripts. I think it should be replaced with "Ext.util.KeyNav". Thank you.
  7. #7
    Thank you for rapid response.

Similar Threads

  1. [CLOSED] KeyMap Problem
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Mar 01, 2012, 12:27 PM
  2. [FIXED] [1.0 RC] KeyMap StopEvent in IE
    By David Pelaez in forum Bugs
    Replies: 5
    Last Post: Jan 11, 2011, 10:40 AM
  3. [CLOSED] KeyMap and IE
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 06, 2011, 2:48 PM
  4. BorderLayout KeyMap Error
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Dec 17, 2009, 8:18 AM
  5. Keymap doesn't work
    By Kamal in forum 1.x Help
    Replies: 2
    Last Post: Aug 13, 2009, 10:49 AM

Posting Permissions