Hi!
I have declared a custom style as:
[Style(name=“fromColors”, type=“Array”, format=“Color”, inherit=“no”)]
If then I set to it only one value:
<mx:Style>
MyCompo {
from-colors: #EF7651; //#EF7651, #AA0051;
}
</mx:Style>
Then retrieving it as:
var fromColors:Array = getStyle(“fromColors”);
throws a runtime error since getStyle doesn’t retrieve or can convert this single value to an Array. Isn’t this strange? Why it couldn’t be converted as a single value Array?
Any ideas about this?
The workaround I have done is creating the array with a single value but seems very awfull.
thanks a lot!
Polaco.
0 REPLIES
- Log in or join for free to make a comment.
Topic Categories


