Главная страница
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.053 c
3-1114831865
magician
2005-04-30 07:31
2005.06.14
Сформировать запрос


3-1115289576
Борис72Ф
2005-05-05 14:39
2005.06.14
кирилица в IB


1-1117185097
electric
2005-05-27 13:11
2005.06.14
Прокрутка в TWebBrowser


14-1116690237
Nikolay M.
2005-05-21 19:43
2005.06.14
Кто помнит, как добраться до места прошлогодней MMP?


1-1116994434
Jupiter
2005-05-25 08:13
2005.06.14
Копирование и переименование директорий