使用带有可绑定元标记和mxml的ASDoc [英] Using ASDoc with Bindable metatag and mxml

查看:269
本文介绍了使用带有可绑定元标记和mxml的ASDoc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




  • 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,就可以指定一个事件名称。但 flex docs says that if if你用Bindable标签指定一个事件名称,然后你负责生成和分派事件。我的项目几乎已经完成,我依赖于很多地方的绑定(没有事件名称),使得返回并改变一切是不切实际的 - 它需要很多努力;加上创建文档的工作代码的想法听起来很可怕。



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

    Adob​​e

    任何人都可以在这个问题上谈一谈?



    另外, Adob​​e博客说 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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