Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[417] >질문< Drivecombobox 에 관한 Warning 입니다.
scat [ ] 2297 읽음    1997-12-24 13:46

프로그램 수행도중 다음 함수를 처리하는데 BuildAll 을 하면

( Variable 'DriveComboBox' might not have been initialized ) 라는 메세지를

가지는 Warning 이 발생합니다. 도대체 이유가 무엇인지요 그리고

해결 방법은 무엇인지요 가르쳐 주시면 감사하겠습니다.


function GetCDRomVolumeName(sDrive:String):String;
var
  DriveComboBox:TDriveComboBox;
begin
  Result:='';
  if Length(sDrive)<=0 then exit;
  try
    DriveComboBox:=TDriveComboBox.Create(Application.Mainform);
    if DriveComboBox=nil then exit;
    DriveComboBox.Visible:=FALSE;
    DriveComboBox.Parent:=Application.Mainform;
    DriveComboBox.TextCase:=tcUpperCase;
    DriveComboBox.Drive:=sDrive[1];
    Result:=Copy(DriveComboBox.Text,5,Length(DriveComboBox.Text)-5);
  except

    if DriveComboBox <> nil then DriveComboBox.Free;   / 이곳에서 warning 이 발생함 /
 
end;

  DriveComboBox.Free;   

end;


+ -

관련 글 리스트
417 >질문< Drivecombobox 에 관한 Warning 입니다. scat 2297 1997/12/24
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.