- WonLen
- 等级:


- 性别:
 - 文章: 114
- 积分: 350
- 来自: 大连

|
详细请看:http://s.k-zone.cn/asdoc3
上一篇文章,介绍了如何在AS文件里面写ASDoc文档。 本篇文章介绍在MXML中编写ASDoc文档。
单行注释: <!--- asdoc comment -->
多行注释: <!--- /** * Comment for my class * which is implemented as mxml */ --> <!--- * Comment for my class * which is implemented as mxml -->
例如:(例子摘自http://s.k-zone.cn/asdocmxml)
<?xml version="1.0"?> <!-- asdoc\MyVBoxID.mxml --> <!--- The class level comment for the component. This tag supports all ASDoc tags, and does not require a CDATA block.
@see mx.container.VBox --> <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:s="library://ns.adobe.com/flex/spark"> <!--- Comment for first button appears in the output. --> <s:Button id="myButton" label="This button has a comment"/> <s:Button id="myButton2" label="Has id but no comment so appears in output"/> <!--- Comment for button with no id is ignored by ASDoc. --> <s:Button label="This button has no id"/> </mx:VBox>
同样在mxml里面的<fx:Script></fx:Script>里面也可以使用ASDoc Tags <fx:Script> <![CDATA[ import flash.events.MouseEvent; /** * For a method in an <Script> block, * same rules as in an AS file. * * @param eventObj The event object. */ public function handleClickEvent(eventObj:MouseEvent):void { dispatchEvent(eventObj); } /** * For a property in an <Script> block, * same rules as in an AS file. */ public var myString:String = new String(); ]]> </fx:Script>
<fx:Declaration>:
例如: <fx:Declarations> <!--- Specifies the skin for the first button on the ButtonBar. @default spark.skins.default.ButtonBarFirstButtonSkin --> <fx:Component id="firstButton"> <s:ButtonBarButton skinClass="spark.skins.default.ButtonBarFirstButtonSkin" /> </fx:Component> </fx:Declarations>
<fx:Metadata>:
例如: <fx:Metadata> <![CDATA[ /** * Defines the default style of selected text. */ [Style(name="textSelectedColor",type="Number",format="Color",inherit="yes")] ]]> </fx:Metadata>
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|
返回顶楼 |
|
|
- yantoba
- 等级: 初级会员

- 性别:
 - 文章: 22
- 积分: 0
- 来自: 上海

|
字好灰,看起来好累。。
|
返回顶楼 |
|
|
- WonLen
- 等级:


- 性别:
 - 文章: 114
- 积分: 350
- 来自: 大连

|
yantoba 写道 字好灰,看起来好累。。
是有些灰色哦,下次注意~~~
|
返回顶楼 |
|
|
- momoko8443
- 等级: 初级会员

- 性别:
 - 文章: 50
- 积分: 20
- 来自: 上海

|
3我没用过,4的ASDoc里面bug不少。
1、html标记在asdoc view中正常显示,在生成doc时通不过validation 2、@see 在同一个类中 使用函数名不能引用到,必须使用全路径 3、@copy 无法被传递2次。如B拷贝了A的注释,C拷贝了B的注释,在ide下是好的,转doc时就会发生C显示注释有误。
|
返回顶楼 |
|
|
- WonLen
- 等级:


- 性别:
 - 文章: 114
- 积分: 350
- 来自: 大连

|
momoko8443 写道 3我没用过,4的ASDoc里面bug不少。
1、html标记在asdoc view中正常显示,在生成doc时通不过validation
2、@see 在同一个类中 使用函数名不能引用到,必须使用全路径
3、@copy 无法被传递2次。如B拷贝了A的注释,C拷贝了B的注释,在ide下是好的,转doc时就会发生C显示注释有误。
呵呵,世界真小,编辑群的朋友
|
返回顶楼 |
|
|