Not quite right?

2 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 25 Apr 2010 Link to this post

    I discovered this on one of my first ventures in to refactoring JS code ...

    Before ...
            <script type="text/javascript"
              function xx() { 
                // Blah, doing stuff 
                var szp = $find("<%= RadPane1.ClientID %>"); 
                szp.expand(); 
                // more stuff 
              } 
            </script> 

    After using JC's "Extract Method" ...
            <script type="text/javascript"
              function xx() { 
                // Blah, doing stuff 
                NewMethod($find); 
                // more stuff 
              } 
              function NewMethod($find) 
              { 
                var szp = $find("<%= RadPane1.ClientID %>"); 
                szp.expand(); 
              } 
            </script> 

    That's not right, is it?

    -- 
    Stuart

  2. Kaloyan
    Admin
    Kaloyan avatar
    82 posts

    Posted 28 Apr 2010 Link to this post

    Hello Stuart,

    Thanks for bringing that to our attention. Seems that JustCode does not recognize ASP.NET AJAX shortcut functions like $find(), $get(), etc. and is treating them as local variables. I've created a PITS issue for that (ID#1972), from which you can follow its progress.

    Greetings,
    Kaloyan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top