0 Replies Latest reply on Nov 27, 2013 12:51 AM by bh-pano-life

    ValueObject - "Change this value according to your application's floating-point precision"

    bh-pano-life

      Working with AMF and PHP my Number values loose precision once in a while. Had a look at _Super_MyValueObjectClass and found out that the setter does something like this:

       

      /**

      * data/source property setters

      */

      public function set t1(value:Number) : void

      {

           var oldValue:Number = _internal_t1;

           if (isNaN(_internal_t1) == true || Math.abs(oldValue - value) > epsilon)

           {

               _internal_t1 = value;

               this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "t1", oldValue, _internal_t1));

           }

      }

       

      Looking for epsilon I found this:

       

      // Change this value according to your application's floating-point precision

      private static var epsilon:Number = 0.0001;

       

      The Problem is, _Super_MyValueObjectClass is autogenerated, but I don´t want this stupid epsilon. How can I get rid of it? Overriding it in the subclasses would be possible but also very annoying as I have a lot of value objects. I searched the net but found nothing. Please help.