List Info

Thread: Bug: extend and static problem




Bug: extend and static problem
country flaguser name
Norway
2007-04-12 03:58:51

Just noticed a compiler problem.

 

I extended UIComponent which I later found out has the variable minWidth

var minWidth : Float;

 

But before I found out I had code that looked something like this…;

 

class Foo extends mx.core.UIComponent {

   //My own declaration as a static float

   private static var minWidth : Float = 100.0;

 

  public function new() {

      super();

      // This will trace 0 because the variable in UIComponent is 0

      trace (minWidth );

   }

}

 

But the compiler doesn̵7;t complain…

 

Best of regards

Tobias

 

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )