12 Replies Latest reply on Jul 7, 2011 6:40 AM by UbuntuPenguin

    Event binding on getter/setter function


      I found this snippet of code when I walked through a Flex3.6 project:



                public function get currentPage ():int {
                     return this._currentPage;
                protected function set _currentPage (value:int):void {
                     if (this._currentPage == value){
                     this.__currentPage = value;
                     this.dispatchEvent(new Event(BookEvent.CURRENTPAGE_CHANGED));
                protected function get _currentPage ():int {
                     return this.__currentPage;




      what is it meant to do by declaring a bindable event above the getter function immediately???


      Thanks a lot.