線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:2581
推到 Plurk!
推到 Facebook!

"filectrl" is specific to a platform

答題得分者是:hagar
luowy651
高階會員


發表:257
回覆:313
積分:114
註冊:2003-04-09

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-08-05 10:58:38 IP:218.74.xxx.xxx 未訂閱
求教各位大大,该软体作用是取得目录名,以下是我的全部code,在form上只有一个button1和一个edit1,运行可以通过,使用也没问题,但在run时会出现英文"[warning]unit1.pas(6): "filectrl" is specific to a platform",请问如何消除?因为使用了SelectDirectory函数,所以在uses中加入了FileCtrl 不胜感激! unit Unit1; interface uses Windows, Messages,FileCtrl, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var dir:String; begin if SelectDirectory(dir,[],500) then Edit1.text := Dir; end; end. 發表人 - luowy651 於 2004/08/05 11:00:32
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-08-05 11:49:02 IP:202.39.xxx.xxx 未訂閱
該訊息是警告它只適用在 windows 系統, 不適用在 linux 系統 您可以用滑鼠在錯誤訊息上點一下, 然後按 F1 取得詳細說明.    不想出現此類訊息的方法可參考下篇: http://groups.google.com/groups?hl=zh-TW&lr=&ie=UTF-8&th=acd2d49e77b59b9f&rnum=2    兩個人的回答, 轉貼如下: ============================================================== Peter Below (TeamB)      Disabling platform and symbol warnings    You can always just add the following undocumented settings to your {project}.cfg file. -w-SYMBOL_DEPRECATED -w-SYMBOL_LIBRARY -w-SYMBOL_PLATFORM -w-UNIT_LIBRARY -w-UNIT_PLATFORM -w-UNIT_DEPRECATED This will turn off all project level warnings. ============================================================== There are a couple of ways to do this. We ran into this because of our use of the ForceDirectories (and FileExists if I remember correctly). These two functions are now part of the SysUtils unit and we were simply able to remove FileCtrl from our uses clause. Additionally, you can add the following compiler directive to each unit in which you are getting this warning where removing FileCtrl is not practical: {$WARN UNIT_PLATFORM OFF} I personally try not to mess with the *.cfg files. Mostly due to my ignorance of their internals. Best Regards, Eric W. Carman ============================================================== -- 向 KTop 的弟兄們致敬! 發表人 - hagar 於 2004/08/05 12:46:01
luowy651
高階會員


發表:257
回覆:313
積分:114
註冊:2003-04-09

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-08-05 12:06:56 IP:218.74.xxx.xxx 未訂閱
引言: 該訊息是警告它只適用在 windows 系統, 不適用在 linux 系統 您可以用滑鼠在錯誤訊息上點一下, 然後按 F1 取得詳細說明. 不想出現此類訊息的方法可參考下篇: http://groups.google.com/groups?hl=zh-TW&lr=&ie=UTF-8&th=acd2d49e77b59b9f&rnum=2 -- 向 KTop 的弟兄們致敬! 發表人 - hagar 於 2004/08/05 11:51:53
原来如此,谢谢hagar大大,只是你的网上链接我打不开 能否把它贴过来看看< >< >
系統時間:2024-09-12 7:21:10
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!