将 ASDoc 与可绑定元标记和 mxml 结合使用

发布于 2024-08-03 05:28:40 字数 1809 浏览 9 评论 0原文

我正在使用 ASDoc 创建 Flex 项目的文档,但在可绑定元标记方面遇到了一些问题。

  • ASDoc 不会记录 公共 Bindable 值,除非 Bindable 标记具有与其关联的事件名称。

例如:

//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 预先添加随机 值字符串到受保护的 Bindable 的名称 如果可绑定标记没有与其关联的事件名称。

例如:

//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;

总而言之,ASDoc对没有事件名称的 Bindable 标签不满意。看来,简单的解决方案是每当将某些内容声明为“可绑定”时指定一个事件名称。但是flex文档说如果u 使用 Bindable 标签指定事件名称,然后“您负责生成和分派事件”。我的项目即将完成,并且我在很多地方都依赖于绑定(没有事件名称),这使得返回并更改所有内容是不切实际的 - 它需要付出很多努力;再加上搞乱创建文档的工作代码的想法对我来说听起来很可怕。

在生成 asdoc 之前用 [Bindable("blah")] 替换所有 [Bindable] 实例,然后将它们改回来是我能想到的唯一解决方法。但我觉得应该有更好的办法。

Adobe bug tracker 声称公共变量的问题已在最新版本中修复构建,所以我下载了最新的 flex sdk (3.4) 并尝试使用它附带的 ASDoc - 但它给了我相同的结果。

谁能解释一下这个问题?

另外,Adobe 博客说 ASDoc 现在也支持 mxml,但是当我尝试使用最新的(flex 3.4)ASDoc,我的mxml asdoc注释(嵌入)没有出现在生成的html页面中。有谁知道最新的 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

勿挽旧人 2024-08-10 05:28:40

虽然我无法帮助您找到解决方法,但问题是 [Bindable] (无事件名称)围绕该属性生成包装器代码(我相信是一个单独的属性)。这段代码显然扰乱了 asdoc。

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.

×眷恋的温暖 2024-08-10 05:28:40

您没有提供任何 Jira 编号进行检查,但是...

MXML 的 ASDoc 更改仅在 Flex 4 (IIRC) 中,我会检查绑定错误是否相同。

You don't provide any Jira numbers to check, but...

The ASDoc changes for MXML are only in Flex 4 (IIRC), I'd check the binding bug isn't the same.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文