张志峰的博客

水滴石川,积少成多。

导航

随笔分类 -  Delphi waring

摘要:在delphi中, reintroduce作用当在子类中重载或者重新声明父类的虚方法时,使用 reintroduce 关键字告知编译器,可以消除警告信息.如: TParent = class procedure proc;virtual; end; TChild = class(TParent) p... 阅读全文

posted @ 2015-03-06 15:46 ╰★张志峰★╮ 阅读(722) 评论(0) 推荐(0)

摘要:最近整理前人的代码,有好多的hint和waring, 其中整理到Method 'CreateNew' hides virtual method of base type 'TCustomForm', 搞了好一会, 记录下来。之前这个方法没有加上reintroduce;overload; Reintr... 阅读全文

posted @ 2014-12-03 10:57 ╰★张志峰★╮ 阅读(967) 评论(0) 推荐(0)

摘要:这时因为在.pas文件中存在delphi无法识别的编码,也就是说.pas文件中的字符并非是纯粹的可由文本文件编辑器所能识别的编码。所以,delphi就不可能有效地解释这些编码。因而就出现了自动代码提示功能失效的错误。将.pas文件拷贝到ultraEdit中保存一下,再打开复制出文本拷贝回delphi... 阅读全文

posted @ 2014-10-13 16:21 ╰★张志峰★╮ 阅读(1706) 评论(0) 推荐(0)

摘要:有时在Delphi使用指针类型的数据,总是提示如下:[Warning] FGroupFeedBack.pas(796): Unsafe typecast of 'Pointer' to 'TObject'[Warning] FGroupFeedBack.pas(696): Unsafe type 'PChar'比较烦,虽说不是bug,但是看着不爽。做程序最好做到没有waring和hints.说说怎么关闭这个waring, 其他的waring需要找出代码的不完善行,后改善,但这种waring只可以用编译命令来关闭了, 在单元的{$R *.DFM} 阅读全文

posted @ 2013-08-02 13:47 ╰★张志峰★╮ 阅读(1328) 评论(0) 推荐(0)

摘要:Display PreferencesWarning messages (Delphi)Go Up to Delphi Compiler Directives (List) IndexTypeSwitchSyntax{$WARN identifier ON | OFF | ERROR | DEFAULT}DefaultAll warnings are enabledScopeLocalRemarksThe $WARN directive gives you fine-grained control over individual warning messages.Syntax Effect{$ 阅读全文

posted @ 2013-08-02 13:34 ╰★张志峰★╮ 阅读(2822) 评论(0) 推荐(1)