C++Builder 程序员博客
29 Aug
不知道大家有没有发现,在代码里写:
// todo: 这里应该写什么代码…
这行字就会出现在To-Do List窗口里,下次打开此工程后直接又击To-Do List窗口里的这行字就能跳到对应的代码里。
这样我就可以在关闭BCB前把接下来的思路写到//todo:后面,然后第二天接着写了(偶第二天总是要花点时间来进入状态,有了这个进入状态的时间应该会大大减小了)。
偶的BCB6是装了cnPack的,不知道是cnPack的功能还是BCB6自带的功能。
俺也不知道, 俺也想试试, 俺还想拿分!
只在2007里面发现了(复制同事的一段代码,刚好里面有//TODO:,于是后面就自己试着添加之…),CB6倒没有发现过.
接分,cnPack是个好东西
接分
cnpack干嘛的
刚看了下,CB6 也有这个功能,只是平时没注意到、也没用到,还真是挺有用!
这个功能是 D5 就开始有的了,不过 D4 就不知道有没有,BCB3 中肯定是没有的
呵呵 谢谢!谢谢毛。。俺还不知道呢
少打了个毛字 呵呵。。。
我也装了CNPACK,赶快看看
jf不失望
自带的,不过cnPack也蛮好用的,打了书签关闭再开还存在的。
看起来不错/.
试了一下,果然(以前从不用To-Do List)
thanks!
试了一下,5.0的也可以
这个本来就是BCB的功能,好像再看VC或其它代码时也看到过只是觉得它没有用,就没去管他,经你这么一说还觉得真是。
我還以為 todo list 是用來干什麼的,原來是這樣用。真是恍然大悟啊。
恩,接分。
在VC中看到//TODO:注释是自动生成的,以为只是个注释(貌似没有TODO List视图),
而在CB中发现一个To-Do List视图,却不知道怎么用(不会自动生成一个//TODO:注释)。
谢谢毛毛的说明,多学了一招!
在BCB6的帮助里找到说明了:
To embed to-do list items in the source code:
You can add specific items directly within the source code in two ways:
Right-click in the Code editor and choose Add To-Do Item. Type the item in the Add To-Do List Item dialog box.
Type the item in the source code using the to-do item syntax.
To-do list items added directly into the source code relate to that specific unit module. You can add global to-do list items by right-clicking on the list and choosing Add.
To-Do Item syntax
Use the following syntax for to-do list items in your source code:
/* TODO ¦DONE [n] [-o <owner>] [-c <category>] : <to-do item text> */
The word TODO is changed to DONE to mark an item as completed or checked.
Where:
n is a priority that can be set to a number from 1 (highest) to 5 (lowest). Setting n to 0 means assign no priority. It is optional but must be specified right after the TODO or DONE keyword.
TODO is a keyword that indicates a to-do list item. When the item is completed, changes to DONE. Case is not important.
DONE indicates a completed to-do item. Replaces the word TODO when you check an item in the to-do list. Case is not important.
-o owner is the name of the person or group responsible for the item. It may contain spaces and is optional.
-c category is the type of item, such as a UI task. It may contain spaces and is optional.
Note: The to-do item text many not contain any character (or characters) that terminates a comment. .
To-do list items you enter in the source code are added to the list as you type them. The to-do item text is added to the list. The status, priority, and owner are added if you specified them in the code.
The order in which you specify owner and category is not important but the status (if included) must go first. The name of the module that contains the embedded item is automatically added to the to-do list. For single-line to-do list items, you can also precede the item with the // or /* comment delimiter.
For example:
/* TODO 2 -oNell: Implement stubbed out methods} */
Creates a priority 2 to-do list item for which Nell is responsible and which says 揑mplement stubbed out methods.?
/* Todo 1 -oSarah Alexander -cUI changes: Tell documentation about all changes/*
Creates a priority 1 to-do list item for which Sarah Alexander is responsible and which says 揟ell documentation about all changes?
When you put a check mark in the to-do list for the above item, the syntax in the source code changes to the following:
/* DONE 1 -oSarah Alexander -cUI changes: Tell documentation about all changes } */
You can also include to-do list items in a comment beginning with // in most cases. For example:
//TODO 1 -oBoss: Resolve must fix bugs
However, avoid nested to-do comments such as the following:
//This is a comment within a comment. {TODO: This won't work!!}
The nested to-do list item will not appear in the list in this case.
好!
顺便问一下我的cb2007 alt+f9不管用.必须点菜单是怎么回事?
感觉没有冲突的热键啊.
应该是自带的。不过由于装了cnpack后里面可以创建快照,所以都用快照搞定。
jf
汗………………我一直在用,以为大家也都知道………………
汗………………我刚才知道,以为大家跟我一样也都不知道………………
这个功能不错,试试看.
听说过,但是一直没有用到。很多习惯都是这样的。习惯的一些操作方法可能不是最便利的。
是这样的,所以很多功能全的软件其实我们 都 没用到
我05年时候发现的,
不过忍住了没有共享(当时好多人发惊天大秘密和大家共享)
我那个时候不知道todo的用法,后来看人家用vc的说可以写todo,我们的客户说代码提交的时候里面不能有todo
就研究了下,发现了那个todo 嘿嘿。
后来有什么todo* ? 等等经人家说,说是程序员约定俗成的,有的表示这里可能有莫名其妙的错误,没有测试到,没有想到
有些是代表功能要做,汗一个。
超级聚会啊!首脑会议!我也学习下!
CB5好象就有了,然后一直用着。我也以为大家都用着了。
学习&&接分不亦乐乎^^
哦,CB自带的功能
学习
我才用一年,感觉上手挺快的
以前略用过这个功能。
早就发现了,不过还不够方便!
^-^