We are trying to develop a flash engine with several levels of abstraction. This flex project contains:
application (1) β load class (2) β load another class (3) that initializes the Flex component (4).
The downloads use SWFLoader. The last component of Flex (4) is just a group with AdvancedDataGrid. We do not define skins, so I suppose it should use skins by default.
The problem is that an error is thrown at runtime because the default skin for components cannot be found in the Flex (4) component. In our case, for AdvancedDataGrid:
Error
in mx.controls::AdvancedDataGridBaseEx .
Guilty team: getStyle("headerSeparatorSkin"); which returns null
At the moment, we have found two solutions:
the first solution is to add the headerSeparatorSkin="spark.skins.SparkSkin" attribute in the AdvancedDataGrid component of the Flex (4) component. But that means I have to manually add every skin for every part of the component, which is a pretty boring decision.
the second solution is to put the creation of AdvancedDataGrid in the first application (1). I believe that it adds AdvancedDataGrid to the compilation and linking process. However, this solution is not very pleasant, because application (1) needs to know which UIComponents are used by the Flex (4) component.
We tried the compiler parameter "keep-all-type-selectors = true" (for example, this ), but nothing changed.
So, is there any solution to make the compiler explicitly bind the Flex component and its skin in a sub-application?
source share