Главная страница
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.031 c
1-1116961917
Erick
2005-05-24 23:11
2005.06.14
"is not a valid integer value"


1-1116918112
FANAT
2005-05-24 11:01
2005.06.14
Массив комбиков


1-1117003467
seg
2005-05-25 10:44
2005.06.14
Как сделать, чтобы компоненты растягивались


1-1117392109
Layner
2005-05-29 22:41
2005.06.14
Объединить Grid &amp; PopupMenu в одном компаненте


1-1117194534
Masta Hookah
2005-05-27 15:48
2005.06.14
"ZIP" -> COMPRESSED