1 Reply Latest reply on Aug 6, 2008 9:13 AM by Newsgroup_User

    Method marked override must over ride another method

    josh_aries Level 1
      Hi ,
      I am working on validating a Radio button group validator.

      Here is the code that I have. I get the following error for the override methods

      Severity and Description Path Resource Location Creation Time Id
      1020: Method marked override must override another method.

      Thanks in advance
        • 1. Re: Method marked override must over ride another method
          Level 7
          You're not extending anything, so there is nothing to override.

          HTH;

          Amy

          "josh_aries" <webforumsuser@macromedia.com> wrote in message
          news:g7chur$sg4$1@forums.macromedia.com...
          > Hi ,
          > I am working on validating a Radio button group validator.
          >
          > Here is the code that I have. I get the following error for the override
          > methods
          >
          > Severity and Description Path Resource Location Creation Time Id
          > 1020: Method marked override must override another method.
          >
          > Thanks in advance
          >
          > package com.test.validators
          > {
          > import mx.controls.RadioButton;
          > import mx.controls.RadioButtonGroup;
          > import mx.validators.StringValidator;
          >
          > public class RadioButtonGroupValidator
          > {
          >
          > private var _radioButtonGroupInitialized:Boolean = false;
          >
          > public function RadioButtonGroupValidator() {
          > super();
          > }
          >
          >
          > override function doValidation(value:Object):Array {
          >
          > if (!_radioButtonGroupInitialized && (source is RadioButtonGroup ||
          > listener
          > is RadioButtonGroup)) {
          > removeListenerHandler();
          > addListenerHandler();
          > }
          >
          > return super.doValidation(value);
          > }
          >
          >
          > //--------------------------------------------------------------------------
          > //
          > // Overridden properties
          > //
          >
          > //--------------------------------------------------------------------------
          >
          > //----------------------------------
          > // actualListeners
          > //----------------------------------
          >
          > /**
          > * @private
          > * Returns either the listener or the source
          > * for the day, month and year subfields.
          > */
          > override protected function get actualListeners():Array {
          > var results:Array = super.actualListeners;
          >
          > if (results == null || results.length < 1) {
          > return results;
          > }
          >
          > var sourceElem:Object = results[0];
          > if (sourceElem && sourceElem is RadioButtonGroup) {
          > var numRadioButtons:int = RadioButtonGroup(sourceElem).numRadioButtons;
          >
          > for (var i:int = 0; i < numRadioButtons; i++) {
          > var rb:RadioButton = RadioButtonGroup(sourceElem).getRadioButtonAt(i);
          > results.push(rb);
          > rb.validationSubField = null;
          > }
          >
          > if (numRadioButtons > 0) {
          >
          > _radioButtonGroupInitialized = true;
          > }
          > }
          >
          > return results;
          > }
          >
          > }
          > }
          >