[CLOSED] [#632] JavaScript runtime error: Expected ']' in ext.axd

Page 2 of 2 FirstFirst 12
  1. #11
    Hi,

    You are right Vladimir, I am not that worried about that now.
    From my experience in .NET (I don't know how about JavaScript as I started few months ago) exception handling doesn't have the best performance.

    In this case constant throw-catch might not be the best thing. e.g. I have now counted around 2000 try-catch calls (logged exceptions) in my application started just before replaying to this thread.
  2. #12
    Yes, you are right exception throwing is quite expensive operation (performance)

    I have now counted around 2000 try-catch calls (logged exceptions) in my application started just before replaying to this thread.
    Do you mean 2000 exceptions in that exactly try/catch block (in Ext.net.getEl)? If yes then can you provide test case when exception is thrown in that block
  3. #13
    Test case might have to do with environment and versions.
    Please see my version in previous replies. (Win 8.1pro, VS2013, IE11)

    This happens when I run just a plain code like that:

    <%@ Page Language="C#" %>
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
    	<title>Ext.NET v3 Example</title>
    </head>
    <body>
    	<form runat="server">
    		<ext:ResourceManager runat="server"/>
    	</form>
    </body>
    </html>

    That's the result... more or less... The method Peter mentioned earlier is called constantly and always throw exception when 'eval' is executed.

    The "try-catch" in that particular method looks like a "quick patch" for something.




    Thank you
  4. #14
    Thanks for the report, it will be fixed in next release
    For now please use
    <script>
            Ext.net.getEl = function (el, skipDeep) {
                if (Ext.isEmpty(el, false)) {
                    return null;
                }
    
    
                if (el.isComposite) {
                    return el;
                }
    
    
                if (el.getEl) {
                    return el.getEl();
                }
    
    
                if (el.el) {
                    return el.el;
                }
    
    
                var cmp = Ext.getCmp(el),
                    tEl;
    
    
                if (!Ext.isEmpty(cmp)) {
                    return cmp.getEl();
                }
    
    
                if (Ext.validIdRe.test(el)) {
                    tEl = Ext.get(el);
                }            
    
    
                if (Ext.isEmpty(tEl) && skipDeep !== true) {
                    try {
                        tEl = Ext.get(el);
                        if (tEl && tEl.dom) {
                            return tEl;
                        }
    
    
                        return Ext.net.getEl(eval("(" + el + ")"), true);
                    } catch (e) { }
                }
    
    
                return tEl;
            };
        </script>
  5. #15
    Thank you. The patch works.

    Looking forward for the new release.
  6. #16
    Created an Issue.
    https://github.com/extnet/Ext.NET/issues/632

    The fix has been committed in the revision 6243 (trunk). It goes to 3.1.

    Please update and retest.

    Again thank you for the report!
  7. #17
    Removed the Vladimir's patch from my code. Downloaded and compiled last trunk.

    I confirm, the bug is fixed.

    Thank you
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] JavaScript Error SCRIPT1009 Expected '}'
    By ashleysbuss in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 05, 2013, 3:19 PM
  2. Replies: 2
    Last Post: May 09, 2013, 3:41 PM
  3. Microsoft JScript runtime error: Object expected
    By shrenuj_dev in forum 1.x Help
    Replies: 0
    Last Post: May 11, 2011, 5:02 AM
  4. Replies: 1
    Last Post: Dec 30, 2010, 5:44 AM
  5. [CLOSED] Desktop - Microsoft JScript runtime error: Object expected
    By Zarzand in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 18, 2010, 8:10 PM

Posting Permissions