# \[Bindable\] getter ignores setter: Workaround

**URL:** <https://forum.kirupa.com/t/bindable-getter-ignores-setter-workaround/310802>\
**Category:** flash\
**Created:** [June 19, 2010, 7:40pm UTC](https://forum.kirupa.com/t/bindable-getter-ignores-setter-workaround/310802 "2010-06-19T19:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![efos](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@efos](https://forum.kirupa.com/u/efos)\
**Post date:** [June 19, 2010, 7:40pm UTC](https://forum.kirupa.com/t/bindable-getter-ignores-setter-workaround/310802/1 "2010-06-19T19:40:38Z")

</div>

If you have ever attempted the following:

```auto

private var _moduleID:uint
[Bindable]
public function get moduleID():uint{
    trace("What the hell are you doing here?")
    return _moduleID;
}
public function set moduleID(n:uint):void{
    _moduleID = n;
    trace("That's better")
}

```

You will know that some strange happens when you try to set the variable. The setter code does not fire, the getter does.

The fix:

```auto
[Bindable(event="moduleChanged")]
public function get moduleID():uint{
    return _moduleID;
};
public function set moduleID(n:uint):void{
    _moduleID = n;
    currentModule = toc.acModules[n];
    slideID = 0;
    dispatchEvent(new Event("moduleChanged"))
}

```

Though, don’t ask me why. Is this a bug I should be reporting, or am I missing some valid reason for this behavior?
