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

C++빌더 Q&A
C++Builder Programming Q&A
[12701] [질문] FileListBox 질문여..
박주홍 [] 1287 읽음    2001-11-15 17:35
에거.. 도대체 뭐가 잘못 된지 모르겠군요.. 이거 가지고 도대체 몇시간을 ㅠ.ㅠ
질문은 두가지 인데요..

1.
DirectoryListBox1->Drive = FileListBox1->Drive = DriveComboBox1->Drive;
왜 이게 밑의 에러가 나지요?
[C++ Error] Unit1.cpp(24): E2492 Properties may only be assigned using a simple statement, e.g. "prop = value;"
[C++ Error] Unit1.cpp(24): E2369 Cannot use the result of a property assignment as an rvalue

2.
밑의 프로그램이 왜 소스 폴더와 타겟 폴더가 같게 만들어서 폴더가 동일하다는 에러를 내고난 뒤에
소스 폴더를 바꾸지 않은면 파일이 없다는 에러가 나는 지 모르겠어요..
소스 폴더를 바꾸면 파일이 없다는 에러가 나오지 않거든요..

아.. 그리고 1번의 에러 때문에 그 명령을
DirectoryListBox1->Drive = DriveComboBox1->Drive;
FileListBox1->Drive = DriveComboBox1->Drive;
이렇게 바꿨구여... 바꾸지 않으면
[C++ Error] Unit1.cpp(45): E2096 Illegal structure operation
[C++ Error] Unit1.cpp(48): E2093 'operator!' not implemented in type 'AnsiString' for arguments of the same type
if ( DirectoryListBox1->Directory != DirectoryListBox2->Directory ) { => 45번행
if (!FileExists(FileListBox1->Items->Strings[i])) { => 48번행
이런 에러가 추가 되는 군요..

밑은 프로그램이구요.. 첨부는 전체입니다..

void __fastcall TForm1::DriveComboBox1Change(TObject *Sender)
{
   DirectoryListBox1->Drive = DriveComboBox1->Drive;
   FileListBox1->Drive = DriveComboBox1->Drive;
   FileListBox1->Directory = DirectoryListBox1->Directory;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::DirectoryListBox1Change(TObject *Sender)
{
   FileListBox1->Directory = DirectoryListBox1->Directory;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::DriveComboBox2Change(TObject *Sender)
{
   DirectoryListBox2->Drive = DriveComboBox2->Drive;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
   if ( DirectoryListBox1->Directory != DirectoryListBox2->Directory ) {
      for (int i = 0; i < FileListBox1->Items->Count; i++) {
         if (FileListBox1->Selected[i]) {
            if (!FileExists(FileListBox1->Items->Strings[i])) {
               MessageDlg("File이 없습니다.", mtError, TMsgDlgButtons() << mbYes , 0);
            }
         }
      }
   }
   else
      MessageDlg("Source 폴더와 Target 폴더가 같습니다.", mtError, TMsgDlgButtons() << mbYes , 0);
}


도움을 주시면 정말 감사 하겠습니다.. ^^;



+ -

관련 글 리스트
12701 [질문] FileListBox 질문여.. 박주홍 1287 2001/11/15
12704     Re:[질문] FileListBox 질문여.. 921 2001/11/15
12719         Re:Re:[질문] FileListBox 질문여.. 박주홍 1246 2001/11/15
12742             Re:Re:Re:[질문] FileListBox 질문여.. 1056 2001/11/16
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.