问题描述
- ASDoc doesn使用ASDoc创建我的Flex项目的文档,并且使用可绑定元标记创建一些问题。除非Bindable标签具有与之关联的事件名称,否则不得使用文档
public Bindable
。
例如:
//这是正确记录的
$ * b
$ *
$ *
//这是没有记录的所有
[Bindable]
/ *
*公共可绑定而无事件名称
* * /
public var test2:String;
- ASDoc在随机字符串前加上
protected Bindable
值(如果可绑定标记没有与之关联的事件名称) 。 >
例如:
//这是正确记录为test3
[bindable(someEvent)]
/ *
*受保护的可绑定事件名称
* * /
protected var test3:String;
//但是这被记录为_110251490test4
[Bindable]
$ b $ * /
*受保护的可绑定的事件名称
* * /
protected var test4:String;
综上所述,ASDoc并不满意 Bindable
标签没有事件名称。简单的解决方案似乎是,只要将某些事情声明为Bindable,就可以指定一个事件名称。但 ASDoc现在也支持mxml,但是当我用最新的flex 3.4)ASDoc,我的mxml asdoc注释(嵌入)没有出现在生成的html页面。有没有人知道最新的asdoc是否可以单独下载?
虽然我不能帮你解决问题,是[Bindable](没有事件名称)在属性周围生成包装代码(我相信一个单独的属性)。这段代码显然与asdoc有关。
I am creating the documentation of my flex project using ASDoc and having some issues with the bindable metatag.
- ASDoc doesn't document
public Bindable
values unless the Bindable tag has an event name associated with it.
For example:
//This is documented correctly
[Bindable("someEvent")]
/*
* public bindable with event name
* */
public var test1:String;
//This is not documented at all
[Bindable]
/*
* public bindable without event name
* */
public var test2:String;
- ASDoc prepends random strings to the names of
protected Bindable
values if the bindable tag doesn't have an event name associated with it.
For example:
//This is documented correctly as test3
[Bindable("someEvent")]
/*
* protected bindable with event name
* */
protected var test3:String;
//But this is documented as _110251490test4
[Bindable]
/*
* protected bindable without event name
* */
protected var test4:String;
To sum it up, ASDoc is not happy with Bindable
tags without an event name. The easy solution, it seems, would be to specify an event name whenever you declare something as Bindable. But flex docs say that if u specify an event name with the Bindable tag, then "you are responsible for generating and dispatching the event". My project is almost complete and I've relied on binding (without event names) in a lot of places, making it impractical to go back and change everything - its gonna need a lot of effort; plus the idea of messing up the working code for creating documentation sounds scary to me.
Replacing all [Bindable]
instances with [Bindable("blah")]
before generating asdoc and then changing them back is the only workaround i can think of. But I feel that there should be a better way.
Adobe bug tracker claims that the problem with public variables have been fixed in the latest build, so I downloaded the latest flex sdk (3.4) and tried with the ASDoc that came with it - but it gave me the same result.
Can anyone shed some light on this issue?
Also, Adobe blog says ASDoc now supports mxml too, but when i tried with the latest (flex 3.4) ASDoc, my mxml asdoc comments (embedded in ) didn't appear in the html page that was generated. does anyone know if latest asdoc is available to download separately?
While I can't help you with a workaround, the problem is that [Bindable] (no event name) generates wrapper code (I believe a separate property) around the property. This code is obviously messing with asdoc.
这篇关于使用带有可绑定元标记和mxml的ASDoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!