질문하기질문하기
 

답변됨JavaScript - Formatting Preferences?

  • 2009년 7월 2일 목요일 오후 5: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일 화요일 오전 3: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일 월요일 오전 8: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일 월요일 오후 1: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일 화요일 오전 3: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일 목요일 오후 1: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!