I've ran into this error on two separate occasions, with two different fixes for it.

1)  I was creating a component that used binding to bind a value to a <mx:Text/>'s "text" property.  In order to fix the antiAliasType error there, I was able to break out the in-line binding into a binding tag.

So, this:

<mx:Text text="{value}" />

... became this:

<mx:Binding source="value" destination="theText.text" />
<mx:Text id="theText" text="dummy value" />

2)  I was creating an ActionScript component that created an mx.controls.Text instance programatically.  In order to fix the antiAliasType error in this case, I had to create a fake style:

// In my Component.as file:
var text:Text = new Text();
text.styleName = "advancedAntiAlias"; //  Force a style so the antiAliasType is not null

// In a .css file that gets included:
.advancedAntiAlias {
    font-anti-alias-type: advanced;   
}

I've already file a bug against this, but hopefully one of those 2 solutions should work for you.

-d


Daniel Freiman wrote:

I'm throwing out an idea that I'm not sure will work and I haven't tested, but it's the best I have right now.  Can you instantiate the textfield in the constructor and do the addchild() in createchildren?  Thus it exists for the setter but will be added at the right time.

.


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to