Delphi 2007中的HelpInsight文档 [英] HelpInsight documentation in Delphi 2007

查看:126
本文介绍了Delphi 2007中的HelpInsight文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用D2007,并尝试使用HelpInsight功能(自D2005以来提供)来记录我的源代码。我主要感兴趣的是帮助工具提示工作。从各种网络冲浪和实验中我发现了以下内容:

I am using D2007 and am trying to document my source code, using the HelpInsight feature (provided since D2005). I am mainly interested in getting the HelpInsight tool-tips working. From various Web-surfing and experimentation I have found the following:


  1. 使用三斜杠(///)其他记录的注释样式。即: {*!评论*} {!评论}

  2. 评论必须在声明之前。在大多数情况下,这意味着将它们放在代码的接口部分。 (显而易见的例外是不能从当前单元外部访问的类型和函数,因此在实现块中声明。)

  3. 第一个注释不能用于函数。 (即它必须是一个类型 - 或至少看起来解析器必须在HelpInsight功能起作用之前已经看到类型关键字)

  1. Using the triple slash (///) comment style works more often than the other documented comment styles. i.e.: {*! comment *} and {! comment }
  2. The comments must precede the declaration that they are for. For most cases this will mean placing them in the interface section of the code. (The obvious exception is for types and functions that are not accessible from outside the current unit and are therefore declared in the implementation block.)
  3. The first comment cannot be for a function. (i.e. it must be for a type - or at least it appears the parser must have seen the "type" keyword before the HelpInsight feature works)

尽管遵循了这些规则,但有时帮助洞察只是没有找到我写的评论。一个文件不会产生正确的HelpInsight工具提示,但是如果我将这个文件包含在一个不同的虚拟项目中,它可以正常工作。

Despite following these "rules", sometimes the Help-insight just doesn't find the comments I've written. One file does not produce the correct HelpInsight tool-tips, but if I include this file in a different dummy project, it works properly.

有没有人有任何其他指针/

Does anyone have any other pointers / tricks for getting HelpInsight to work?

推荐答案

我发现了另一个警告(在我的例子中是什么是错误的)

I have discovered another caveat (which in my case was what was "wrong")

看来,具有HelpInsight注释的单位必须显式添加到项目中。在编译项目时,只需将单元放在搜索的路径上即可。

It appears that the unit with the HelpInsight comments must be explicitly added to the project. It is not sufficient to simply have the unit in a path that is searched when compiling the project.

换句话说,该单位必须包含在项目的.dpr / .dproj文件。 (使用Project |添加到项目菜单选项)

In other words, the unit must be included in the Project's .dpr / .dproj file. (Using the Project | "Add to Project" menu option)

这篇关于Delphi 2007中的HelpInsight文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆