0 Replies Latest reply on May 19, 2007 4:22 AM by marcfain

    [Bindable] and getter/setters

    marcfain
      Let's say you want to make a class [Bindable] that has the following property:

      private _myProp : myValueObjectClass
      public function get myProp() : myValueObjectClass
      {
      return _myProp
      }
      public function set myProp( value:myValueObjectClass) : void
      {
      _myProp = value
      // do more things
      }

      As soon as you set the class [Bindable], the setter is not called any more.

      The getter returns a reference to m, so you change the original object. When you set the same object again, Flex compares the setter object with the getter result. Because both are the same objects, it stops running the setter. But why does it stop? It makes sense to refrain from throwing a propertyChange event, but not running the setter method? could anybody explain this?