1

I'm having a strange error occur when working in Titanium. I have an alloy project that is throwing the error "Unused TSS class styling rule" next to the vast majority of my TSS classes.

For example:

".box" : {
    top : 0,
    borderWidth : 2,
    borderColor : '#555',
    borderRadius : 7,
    backgroundImage : '/blur_bg.png',
    opacity : 1,
    height : Ti.UI.SIZE,
    layout : 'vertical'
}

Is there a way to get Titanium to ignore these errors and run the project anyway? Or is there a clean work-around?

Any help is appreciated. Especially if you've come up against this sort of issue before.

C. M. Sperberg-McQueen
  • 24,596
  • 5
  • 38
  • 65
ABOO
  • 145
  • 1
  • 8
  • Yea, it's annoying. But not critical. Usually when I get the aberrant everlasting message when I know for a fact the style exists, I first close/reopen the TSS and XML files. If that didn't clear it, I remove the style to see if the error goes away. Most often, I have a typo somewhere like a missing quote mark in my xml. – Mike S. Sep 06 '14 at 15:58
  • @ABOO Did you manage to sort this out? – imbayago Sep 22 '14 at 05:45
  • I haven't managed to remove the error - but i'm just living with it. So – ABOO Sep 23 '14 at 13:02

1 Answers1

1

Unused TSS class styling rule is just a warning not an error. You should be able to run the project without any problems. The warning basically means that .box is not used in a view.

If you want to hide the warning bubbles go to "Preferences" -> "General" -> "Editors" -> "Text Editors" -> "Annotations" -> "warnings" and uncheck "Vertical ruler" & "Text as".

0101
  • 2,697
  • 4
  • 26
  • 34
  • Tried this option but the app won't run. Errors still showing. – imbayago Sep 22 '14 at 05:27
  • @imbayago may I see your .tss? – 0101 Sep 22 '14 at 09:20
  • The problem must be somewhere else because your styling is running on my side without any difficulties. Try clean the project. – 0101 Sep 22 '14 at 11:01
  • I've tried cleaning the project but the error still shows. Is there a way of running the project while ignoring this error? The Run option won't activate because of this. I found this as well. https://jira.appcelerator.org/browse/TISTUD-6732 Is there a work around to get it to work? – imbayago Sep 22 '14 at 11:17
  • That's not an error, it is only warning. You should be able to run the project without any problems. If you want to run project even if it has some errors go to Preferences - Launching and tick `Always` below "Continue lanuch if project contains errors" (4th row from the top). *Actually you can tick "Prompt" as well and then confirm dialog that will inform you about an error. – 0101 Sep 22 '14 at 11:43