我正在构建一个有点大的Flex项目,其中包含几个模块(一个Flex项目,可以生成多个SWF)
- <s:Application ... >
- <fx:Style source="css/main.css" />
- ...
- </s:Application>
在CSS文件中:
- /* CSS file */
- @namespace s "library://ns.adobe.com/flex/spark";
- s|Panel {
- skinClass: ClassReference("com.skins.DefaultPanelSkin");
- }
- s|Button {
- skinClass: ClassReference("com.skins.DefaultButtonSkin");
- }
CSS文件在其他地方没有引用.
我目前有6个模块(加上主SWF,共7个SWF).我注意到,警告的数量与模块数量相关…每次添加模块时,我会收到更多的警告.现在,我为CSS文件中的每个条目收到6条警告,所以:
- CSS type selectors are not supported in components: 'Panel'
- CSS type selectors are not supported in components: 'Panel'
- CSS type selectors are not supported in components: 'Panel'
- CSS type selectors are not supported in components: 'Panel'
- CSS type selectors are not supported in components: 'Panel'
- CSS type selectors are not supported in components: 'Panel'
并重复Button,TextArea等等.我有这么多无用的警告,不可能看到是否有有效的警告.
这个警告是因为我做错了吗?这些样式都被正确应用,似乎按照我在运行时的方式工作.如果我没有做错,可以告诉编译器忽略这个警告吗?
注意:我尝试了-show-unused-type-selector-warnings = false编译器标志,它不起作用…这是一个类似但不同的警告.