C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
분야별 포럼
C++빌더
델파이
파이어몽키
C/C++
프리파스칼
파이어버드
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

자유게시판
세상 살아가는 이야기들을 나누는 사랑방입니다.
[13557] Destructor, with LiveTemplate
DrK [whitekid] 2513 읽음    2007-11-19 19:32
코딩하다가 문득 destructor Destroy; override 해주는게 갑자기 귀찮아 졌습니다. 그러다 갑자기 LiveTemplate 한번 맹글어 봐?.. 해서 뚝딱뚝닥... 생각보다 쉽군요..

<?xml version="1.0" encoding="utf-8" ?>
<codetemplate    xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
                version="1.0.0">
    <template name="destructor" invoke="manual">
        <description>
            Destructor
        </description>
        <author>
            whitekid@gmail.com
        </author>
        <script language="Delphi" onenter="false" onleave="true">
            InvokeClassCompletion;
        </script>
        <code language="Delphi" context="memberdecl" delimiter="|"><![CDATA[destructor Destroy; override;]]>
        </code>
    </template>
</codetemplate>

View --> Templates를 선택하면 나오는 Templates에서 New로 만들로 destructor.xml로 저장한 후에... 코드에서 dest 치고 Ctrl + J ~ 뚝~

LiveTemplate 기능 좋습니다.~

with template은 보너스..

<?xml version="1.0" encoding="utf-8" ?>
<codetemplate    xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
                version="1.0.0">
    <template name="withc" invoke="manual">
        <point name="selected">
            <text>AClass</text>
            <script language="Delphi">InvokeCodeCompletion;</script>
        </point>
        <point name="params">
            <text>Param</text>
            <script language="Delphi">InvokeCodeCompletion;</script>
        </point>
        <description>
            with object creations
        </description>
        <author>
            whitekid@gmail.com
        </author>
        <code language="Delphi" context="methodbody" delimiter="|"><![CDATA[with |selected|.Create(|params|) do
try
    |end|
finally
  Free;
end;
]]>
        </code>
    </template>
</codetemplate>
망치 [mangchy]   2007-11-20 08:06 X
6.0에서는 쉽게 편집하게 되어 있는데...2007에서 한참 메뉴를 찾고 있었는데 여기에 있었군요...편집하기가 빌더 6.0에서보다는 어려운거 같네요...으

+ -

관련 글 리스트
13557 Destructor, with LiveTemplate DrK 2513 2007/11/19
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.