It might need to be

 

public function set visible(v:Boolean): Void

{

  super.visible = v;

}

 

Also I think you need to make sure to also include a getter that returns super.visible to make sure the full override is successful.

 

Public function get visible() : Boolean

{

  Return super.visible;

}

 

Matt

 


From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 09, 2005 1:14 PM
To: [email protected]
Subject: [flexcoders] Warning from custom component

 

I'm trying to make use of the dynamic FormItem example of a custom
component from the Webster/McLeod book. The code does work, but I'm getting
a warning.

The warning is:

"The function, visible, hides a function in ancestor class, 'mx.core.UIObject'

The code is:

class DynamicFormItem extends mx.containers.FormItem
{
      public function set visible(visible:Boolean)
      {
            super.visible = visible;
            if (!visible)
            {
                  height=0;
            }
            else
            {
                  height=undefined;
            }
      }
}

Is there something wrong with the way I've written the code, or should I
ignore the warning?

- Tom






Reply via email to