Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS: Unsupported selector type ?! #2748

Closed
kutoman opened this issue Mar 25, 2019 · 2 comments
Closed

CSS: Unsupported selector type ?! #2748

kutoman opened this issue Mar 25, 2019 · 2 comments

Comments

@kutoman
Copy link
Contributor

kutoman commented Mar 25, 2019

I'm suddenly getting the following error when running the simulator:


CSS> java.lang.RuntimeException: Unsupported selector type 10
CSS> 	at com.codename1.designer.css.CSSTheme.getElementForSelector(CSSTheme.java:5746)
CSS> 	at com.codename1.designer.css.CSSTheme.apply(CSSTheme.java:5775)
CSS> 	at com.codename1.designer.css.CSSTheme$2.property(CSSTheme.java:6236)
CSS> 	at org.w3c.flute.parser.Parser.declaration(Parser.java:2090)
CSS> 	at org.w3c.flute.parser.Parser.styleRule(Parser.java:1405)
CSS> 	at org.w3c.flute.parser.Parser.afterImportDeclaration(Parser.java:561)
CSS> 	at org.w3c.flute.parser.Parser.parserUnit(Parser.java:498)
CSS> 	at org.w3c.flute.parser.Parser.parseStyleSheet(Parser.java:107)
CSS> 	at com.codename1.designer.css.CSSTheme.load(CSSTheme.java:6244)
CSS> 	at com.codename1.designer.css.CN1CSSCLI.compile(CN1CSSCLI.java:283)
CSS> 	at com.codename1.designer.css.CN1CSSCLI.main(CN1CSSCLI.java:222)
CSS> 	at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:528)
CSS> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
CSS> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
CSS> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
CSS> 	at java.lang.reflect.Method.invoke(Method.java:498)
CSS> 	at com.codename1.impl.javase.JavaFXLoader.runWithJavaFX(JavaFXLoader.java:263)
CSS> 	at com.codename1.impl.javase.JavaFXLoader.main(JavaFXLoader.java:323)
CSS> 	at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:259)
@kutoman
Copy link
Contributor Author

kutoman commented Mar 25, 2019

I've found the cause as there was some string in the css out of place. I think it would be helpful if the line number to the css file would be mentioned in the error

shannah added a commit that referenced this issue Apr 1, 2019
…g the parsing phase, it should now include the line number of the CSS. Some steps are performed after the parsing phase - e.g. when we're actually building the .res file. In these cases it will now report which UIID was being processed, and which style property was being updated at the time. This should make it much easier to track down CSS errors. #2748
@shannah
Copy link
Collaborator

shannah commented Apr 1, 2019

I have made some improvements to the error reporting in the CSS compiler. Now, the error that you posted here will include details about which selector was being processed, and what line number of the CSS file it occurred on.

Some classes of errors won't include a CSS line number because they occur during the .res file building phase. In these cases I have also improved error reporting so that it will show you which UIID and property were being processed at the time of the error.

This will be included in the next update.

@shannah shannah closed this as completed Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants