[CLOSED] Ext.form.Hidden.xtype is different in debug vs release mode

  1. #1

    [CLOSED] Ext.form.Hidden.xtype is different in debug vs release mode

    In debug mode, Ext.form.Hidden.xtype returns "hiddenfield". In release mode, Ext.form.Hidden.xtype returns "hidden". We understand both xtypes are valid but this caused issue because we had a line of code that targeted "hiddenfield" and not "hidden". So when our application is released, stuff got broken. We will change our code to check for both hiddenfield and hidden, but can you tell us why they are different between debug and release? And if there are more things like that.
    Last edited by Daniil; Mar 25, 2014 at 5:01 PM. Reason: [CLOSED]
  2. #2
    Ext.Net HiddenField class uses one xtype value only
    public override string XType
            {
                get
                {
                    return "hiddenfield";
                }
            }
    For me, xtype always the same in Debug and Release mode. I guess that the issue is not related with Ext.Net
  3. #3
    It's the ExtJS files but when I look at Sencha.com's examples, Ext.form.Hidden.xtype is "hiddenfield". Maybe this is a Ext 4.2.1 issue.
  4. #4
    Hi @jchau,

    Could you, please, provide us with a test case?
  5. #5
    We are now seeing the same issue with checkboxfield vs checkbox. To reproduce, go to your example explorers. In browser console (firebug or chrome or IE developer tool), check 'Ext.form.Checkbox.xtype'. It says "checkbox". Switch example explorers to Debug Mode. Check 'Ext.form.Checkbox.xtype' again. It now says "checkboxfield". We have code that checks the xtype of a component. We now check for both checkbox and checkboxfield but it worries me that there can be other xtypes that may say different things base on debug vs release. It can lead to bugs that wont be caught until product goes live into production.
  6. #6
    That is interesting.

    I think you shoud use the isXType method.
    http://docs.sencha.com/extjs/4.2.1/#...method-isXType

    These both statements return true in both the ScriptModes - Release and Debug.
    App.Checkbox1.isXType("checkbox");
    App.Checkbox1.isXType("checkboxfield")

Similar Threads

  1. Replies: 1
    Last Post: Feb 18, 2013, 1:24 PM
  2. [CLOSED] Debug mode shows me resource method after updating from svn
    By profitsistemas in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 01, 2013, 4:56 PM
  3. [CLOSED] TreePanel Debug mode problem
    By asztern in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 19, 2010, 12:16 PM
  4. Replies: 2
    Last Post: Oct 05, 2010, 10:29 AM
  5. [CLOSED] intellisense and debug mode.
    By pkellner in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 29, 2008, 4:34 PM

Posting Permissions