Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.06.14;
Скачать: CL | DM;

Вниз

Ошибка: Symbol faReadOnly is specific to a platform   Найти похожие ветки 

 
lucifer ©   (2005-05-31 18:11) [0]

Взял пример из хёлпа Делфи :

The following example uses an edit control, a button, a string grid, and seven check boxes. The check boxes correspond to the seven possible file attributes. When the button is clicked, the path specified in the edit control is searched for files matching the checked file attributes. The names and sizes of the matching files are inserted into the string grid.

procedure TForm1.Button1Click(Sender: TObject);

var
 sr: TSearchRec;
 FileAttrs: Integer;
begin
 StringGrid1.RowCount := 1;
 if CheckBox1.Checked then
   FileAttrs := faReadOnly
 else
   FileAttrs := 0;
 if CheckBox2.Checked then
   FileAttrs := FileAttrs + faHidden;
 if CheckBox3.Checked then
   FileAttrs := FileAttrs + faSysFile;
 if CheckBox4.Checked then
   FileAttrs := FileAttrs + faVolumeID;
 if CheckBox5.Checked then

   FileAttrs := FileAttrs + faDirectory;
 if CheckBox6.Checked then
   FileAttrs := FileAttrs + faArchive;
 if CheckBox7.Checked then

   FileAttrs := FileAttrs + faAnyFile;

 with StringGrid1 do
 begin
   RowCount := 0;

   if FindFirst(Edit1.Text, FileAttrs, sr) = 0 then

   begin
     repeat
       if (sr.Attr and FileAttrs) = sr.Attr then
       begin
       RowCount := RowCount + 1;
       Cells[1,RowCount-1] := sr.Name;
       Cells[2,RowCount-1] := IntToStr(sr.Size);
       end;
     until FindNext(sr) <> 0;
     FindClose(sr);
   end;
 end;
end;

и возникает следующая ошибка из темы!
В принципе прога работает, но файлы не ищет! Что скажите??


 
Cobalt ©   (2005-05-31 18:27) [1]

2 lucifer ©
Учите английский - "Warning" переводится не как "ошибка".


 
Marser ©   (2005-05-31 18:45) [2]

Это всего лишь предупреждение о привязанности к ОС этой константы.


 
raidan ©   (2005-05-31 20:05) [3]

>lucifer ©   (31.05.05 18:11)  
Это значит, что в Kylix ваша программа вряд-ли скомпилится в рабочий продукт.


 
begin...end ©   (2005-05-31 20:19) [4]

> raidan ©   (31.05.05 20:05) [3]

Это ужасно :))


 
Igorek ©   (2005-05-31 20:52) [5]

$IFDEF KYLIX - вроде есть такое


 
raidan ©   (2005-05-31 21:10) [6]

>begin...end ©   (31.05.05 20:19) [4]
А я вот люблю экстрим и всегда кладу болт на такие предупреждения.
Или, может быть, я не собираюсь ничего делать под Kylix :)


 
Anatoly Podgoretsky ©   (2005-05-31 21:30) [7]

Класть не надо, надо отключить



Страницы: 1 вся ветка

Текущий архив: 2005.06.14;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.062 c
4-1114183071
Хинт
2005-04-22 19:17
2005.06.14
Вывод графики на экран


1-1117200988
alertus
2005-05-27 17:36
2005.06.14
Pointer->Integer->Pointer


4-1114411459
Mihas
2005-04-25 10:44
2005.06.14
Как прочитать из окна WINWORD Текст документа?


6-1111590160
bober
2005-03-23 18:02
2005.06.14
подключение диска


14-1117161434
-[ HAWK ]-
2005-05-27 06:37
2005.06.14
Исходник взломщика для игр