MSDN > 論壇首頁 > Visual Studio Setup and Installation > JavaScript - Formatting Preferences?
發問發問
 

已答覆JavaScript - Formatting Preferences?

  • 2009年7月2日 下午 05:15eacousineau 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Is there a way to change the JavaScript source formatting preferences? I'm trying to write a class in javascript using the 'this' style, but the JS formatter is screwing with my delegate code.

    I've looked in Tools > Options > Editors, but haven't found anything related to JavaScript.
    For now I'm just gonna use an external editor.

解答

  • 2009年7月7日 上午 03:26YiChun ChenMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Hi Eacousineau,

    Thank you for your clarification. Now I can understand it better. :)

    This forum is for the support of Visual Studio installation. Since your issue is related to ASP.NET Web Application, you could post your thread on ASP.NET AJAX forums . This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

所有回覆

  • 2009年7月6日 上午 08:03YiChun ChenMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi Eacousineau,

    More clarification with you. Which edition of Visual Studio are you using now? What kind of project are you developing now? What do you mean "write a class in javascript using the 'this' style, but the JS formatter is screwing with my delegate code."?

    I have VSTS 2008 on my machine and can find JSCript text editor option via Tools >> Options >> Text Editor >> JScript.

    Thanks
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • 2009年7月6日 下午 01:47eacousineau 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     包含代碼
    I'm using Visual C# 2008 in VS 2008 - no other components installed. I'm working in an ASP.NET application, testing some AJAX functionality.
    I checked in the options again but JScript is not listed among the languages under the Text Editor options.

    What do you mean "write a class in javascript using the 'this' style

    Sorry about that - typed it out but forgot to elaborate
    // What I called the 'this' style
    function MyClass()
    {
    	this.value = 12;
    	this.method = function() {
    		console.debug("Test: " + this.value);
    	};
    }
    
    // Prototype style
    function MyClass()
    {
    	this.value = 12;
    }
    MyClass.prototype.method = function() {
    	console.debug("Test: " + this.value);
    };
    
  • 2009年7月7日 上午 03:26YiChun ChenMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Hi Eacousineau,

    Thank you for your clarification. Now I can understand it better. :)

    This forum is for the support of Visual Studio installation. Since your issue is related to ASP.NET Web Application, you could post your thread on ASP.NET AJAX forums . This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • 2009年7月16日 下午 01:22Wrighteous 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I'm having the exact same problem.  I have just installed Visual Studio 2008 and have set the Web Environment.  When I go into Tools > Options > Text Editor there is no option for JScript.  I can see all of the other languages eg. C# C/C++ CSS HTML PL/SQL...  Likewise the Javascript intellisense is not working at all.

    eacousinau, did you have any success?

    YiChun Chen, I was talking with my friend via Windows Live Messenger and he like you has JScript listed as an option under Text Editor.

    Please, anybody...help!