apache / royale-compiler

Apache Royale Compiler
https://royale.apache.org/
Apache License 2.0
98 stars 50 forks source link

TabBar example fails #97

Closed yishayw closed 5 years ago

yishayw commented 5 years ago

Steps to reproduce:

Result: C:\dev\flexjs\royale-asjs\examples\mxroyale\HelloWorld\SparkRoyale.swc:defaults.css(181): col: 2 Error: 'SparkTextButtonItemRenderer' is not defined.

aharui commented 5 years ago

Just from looking at the branch commit:

'SparkTextButtonItemRenderer' has been added as a Type Selector. Type Selectors are defined in a namespace declared at the top of the defaults.css file. In this case:

@namespace "library://ns.apache.org/royale/spark";

The file src/main/resources/spark-royale-manifest.xml did not appear to be changed in the commit to add 'SparkTextButtonItemRenderer' to the namespace. It might have worked if the namespace defined a folder path, but by convention, the framework swcs use namespace URIs.

yishayw commented 5 years ago

Didn't know that, I thought adding to SparkClasses.as was enough. Thanks.

Harbs commented 5 years ago

Actually, it's only necessary to add classes to the [swc]Classes file if it's not defined in the manifest. Classes defined in the manifest are always included in the SWC. The *Classes files are a hack to get the rest of the classes which are not in the dependency list included in the SWC.

HTH...