0 Replies Latest reply on Jan 18, 2007 10:18 AM by chesworth

    effectStarted ReferenceError after updating to 2.0.1

    chesworth
      After updating to Flex 2.0.1 I am experiencing a ReferenceError with a UITextField.

      In the 2.0 code EffectInstance.as has the method startEffect which checks if the target is a UIComponent before calling effectStarted:

      public function startEffect():void
      {
      if (target is UIComponent)
      {
      target.effectStarted(this);
      // Hide the focus ring if the target already has one drawn
      target.drawFocus(false);
      }
      ...
      }

      In the 2.0.1 version of EffectInstance.as it tests if the target is a IUIComponent:

      public function startEffect():void
      {
      if (target is IUIComponent)
      {
      Object(target).effectStarted(this);
      // Hide the focus ring if the target already has one drawn
      Object(target).drawFocus(false);
      }

      ...
      }

      The problem is that effectStarted is part of UIComponent and not IUIComponent and I get the reference error. The target it is accessing when it raises the error is a UITextField in Panel.as:

      protected var titleTextField:UITextField;

      which is an IUIComponent.