10.10.08

Stylesheets and mx_internal

Posted in Flex Code at 10:45 am by rbezemer

To make a long answer short… they don’t work well together.

basically if you want to set a style property on a CSSStyleDeclaration and you have mx_internal declared in your class (i.e. you are overriding a flex sdk component such as a button or list) then you will get weird ambiguous reference warnings like the following:

Id 1000: Ambiguous reference to setStyle

The solution is simple, instead of declaring use namespace mx_internal you just have to scope each of the variables or functions you want access to. i.e. mx_internal::adobe_hidden_variable. After doing this all your CSSStyleDeclarations::setStyle should work, however your code will now look very verbose with all the mx_internals all over the place.

more details can be found here.

Leave a Comment