Contents tagged with JS

  • JS Pseudo-Named functions

    Posted Sunday 22, November 2009, 19:59 in JS

    I’m working recently on next release of GoogleMap Control v4.1.
    As I have mentioned - I’m switching from anonymous to pseudo-named JS function for that release.
    All the effort made, was for a better JS debug and error feedback experience.

    At least, that’s the theory.
    However, today I did some work on the control again and had a chance in practice to prove I was right.
    I got some JS error during my work, but the information I have now in the call stack is much more useful than just a list of anonymous function.

    Here is a simple example of what I mean:


    pseudo-named

    In this particular case, I just mismatch the functions’ bodies, but you get the idea, right.

    Regards

  • VisualStudion 2010 Javascript Outlining 1.0

    Posted Saturday 5, June 2010, 13:06 in VisualStudio, JS

     As a Web 2 developer I found myself dealing with fast growing JavaScript code files.
    And I really missed the code regions in Visual Studio, which is a nice way to organize the code blocks and focus on reasonable small amount of code.
    There are some macros available out on the web for placing a regions outlining in JavaScript code editor.
    I was not fully satisfied with macros and the fact I have to manually run them (even with a shortcut keys) every time I open the JavaScript file.
    Thus, I have spend some amount of my time and came out with a Visual Studio 2010 Editor Extension for JavaScript Oulining.


    Even, if this first version is simple as functionality it gave me much better JavaScript code experience.
    So, I decided to share it with you guys and hope it helps you too.

    Please, find the visual studio package here


    Enjoy

  • VisualStudion 2010 Javascript Outlining 1.2

    Posted Thursday 29, July 2010, 18:11 in VisualStudio, JS

    A support for CSS content type was added in order to use outlining in CSS files, as well.

    Features
    • Outlines CSS codeblock regions for the code placed between { }. The closing brace is places on a new line and there is not another opeing brace on same line.
    • Outlines custom regions defined by:
      • /#region/ - /#endregion/
      • /#>/ - /#</
    Samples
    • code block
    body {
        background-color: #AAA;
        font-family: Verdana;
        font-size: 11px;
    }
    • long custom region definition
    /*#region Test */
    body {
        background-color: #AAA;
        font-family: Verdana;
        font-size: 11px;
    }
    h1, h2, h3, h4 {
        color: #5377A9;
        font-family: Tahoma;
    }
    /*#endregion*/
    • short custom region definition
    /*#> Test */
    body {
        background-color: #AAA;
        font-family: Verdana;
        font-size: 11px;
    }
    h1, h2, h3, h4 {
        color: #5377A9;
        font-family: Tahoma;
    }
    /*#<*/