# ASDoc and getter/setters

**URL:** <https://forum.kirupa.com/t/asdoc-and-getter-setters/300070>\
**Category:** flash\
**Created:** [November 15, 2009, 11:00pm UTC](https://forum.kirupa.com/t/asdoc-and-getter-setters/300070 "2009-11-15T23:00:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IQAndreas](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@IQAndreas](https://forum.kirupa.com/u/IQAndreas)\
**Post date:** [November 15, 2009, 11:00pm UTC](https://forum.kirupa.com/t/asdoc-and-getter-setters/300070/1 "2009-11-15T23:00:12Z")

</div>

I’m finally reading up on commenting code with ASDoc ([http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs\_Book\_Parts&file=asdoc\_127\_1.html](http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=asdoc_127_1.html)) but the way ASDoc is set up doesn’t seem to agree with the way I write my getter/setters.

Here is how I write them:

```auto
//I want to add the ASDoc tags here, before this chunk of code
private var _enabled:Boolean = true;
public function get enabled():Boolean
{ return _enabled; }
public function set enabled(new_enabled:Boolean):void
{ _enabled = new_enabled; }

```

Sadly, if I ad the tags where I want them, if I understand correctly, they will comment the private variable instead. Bummer.

So, either I change the coding style I have been using for the past three years, or insert the tags inside of my code, making it ugly and less structured. I’m leaning towards option A.

My question is, **how do YOU write your getter/setters so they are ASDoc friendly?**
