全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1284
推到 Plurk!
推到 Facebook!

property 的 default

答題得分者是:william
jessechan
版主


發表:109
回覆:394
積分:254
註冊:2002-04-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-03-27 13:53:58 IP:203.75.xxx.xxx 未訂閱
不知有沒有人試過, __property 句中的 default=... 好像沒有作用. 求證於大家. Jesse Chan
------
Jesse Chan
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-03-27 15:47:07 IP:210.3.xxx.xxx 未訂閱
default is used to specify the default value of the property. A property with value equals to the default value will not be written to the dfm file (I think so... never check it &# >
jessechan
版主


發表:109
回覆:394
積分:254
註冊:2002-04-05

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-03-27 16:02:37 IP:203.75.xxx.xxx 未訂閱
引言: default is used to specify the default value of the property. A property with value equals to the default value will not be written to the dfm file (I think so... never check it &# > < face="Verdana, Arial, Helvetica"> Well, as you say, default is used to specify the default value, but it takes no effect if I really specify the default value to property. You can verify this issue via creating a simple component with a simple property using default clause. Jesse Chan
------
Jesse Chan
dllee
站務副站長


發表:321
回覆:2519
積分:1711
註冊:2002-04-15

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-03-27 17:41:37 IP:61.231.xxx.xxx 未訂閱
這又是一個 DELPHI 有 BCB 沒有的功能 (>沒有用,所以我都不寫 > <>沒空更新的網頁... < href="http://big5.to/吃軟也吃硬">http://big5.to/吃軟也吃硬 C及指標教學,計算機概論,資訊管理導論... http://home.kimo.com.tw/dllee.tw http://coolsite.to/ushells 介紹Shells,LiteStep,GeoShell....
------
http://www.ViewMove.com
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-03-27 19:36:10 IP:210.3.xxx.xxx 未訂閱
引言: 這又是一個 DELPHI 有 BCB 沒有的功能 (>沒有用,所以我都不寫 > <>沒空更新的網頁... < href="http://big5.to/吃軟也吃硬">http://big5.to/吃軟也吃硬 C及指標教學,計算機概論,資訊管理導論... http://home.kimo.com.tw/dllee.tw http://coolsite.to/ushells 介紹Shells,LiteStep,GeoShell....
Same for Delphi, you need to assign the "default value" somewhere within the constructor. I think the keyword default is used by the compiler/IDE itself. A property (e.g. Tag) with a value same to the default value (e.g. 0) will not create an entry in the form file (dfm), well... not worth to check since it only saves a few bytes for the file....
dllee
站務副站長


發表:321
回覆:2519
積分:1711
註冊:2002-04-15

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-03-28 10:49:34 IP:61.231.xxx.xxx 未訂閱
引言:
引言: 這又是一個 DELPHI 有 BCB 沒有的功能 (>沒有用,所以我都不寫 > <>沒空更新的網頁... < href="http://big5.to/吃軟也吃硬">http://big5.to/吃軟也吃硬 C及指標教學,計算機概論,資訊管理導論... http://home.kimo.com.tw/dllee.tw http://coolsite.to/ushells 介紹Shells,LiteStep,GeoShell....
Same for Delphi, you need to assign the "default value" somewhere within the constructor. I think the keyword default is used by the compiler/IDE itself. A property (e.g. Tag) with a value same to the default value (e.g. 0) will not create an entry in the form file (dfm), well... not worth to check since it only saves a few bytes for the file....
明白了 所以這個 > <>沒空更新的網頁... href="http://big5.to/吃軟也吃硬">http://big5.to/吃軟也吃硬 http://home.kimo.com.tw/dllee.tw http://coolsite.to/ushells 介紹Shells,LiteStep,GeoShell....
------
http://www.ViewMove.com
系統時間:2024-04-27 22:59:06
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!