I'm trying to do a quick and dirty extension of LegendItem to fix the
fact that, since the UITextFields don't wordwrap, they don't respect
the 100% width given to them by Legend. When I try to override
createChildren to get my fingers on the UITextField, I get a compiler
error 1150: The protected attribute can only be used on class
property definitions.
Here's my function:
override protected function createChildren():void{
super.createChildren();
for (var i:int=0;i<numChildren; i++){
var child:DisplayObject=getChildAt(i);
var txt:UITextField = child as UITextField;
if (!(txt==null)){
txt.wordWrap=true;
txt.invalidateSize();
}
}
}
There's something odd about this class, because usually when you
start typing override protected function in a class, it has a whole
list of functions you might be overriding. But in this class, that
doesn't happen.
If anyone has any ideas, I'd be very grateful.
Thanks;
Amy