ezpzlmnsqz1337
ezpzlmnsqz1337

Reputation: 424

GWT GSS provide and require

trying to do something like explained here: http://blog.arcbees.com/2015/04/28/managing-your-css-files-with-variables-and-a-theme/ )

But I am stuck on the @provide and @require. I have the @provide 'colors'; on a first line in colors.gss, and I have a @require "colors"; on a first line in style.gss.

I have a Resources class, where I have defined

@Source({ "css/colors.gss", "css/style.gss" })
    Style style();

But when I compile, I get:

[ERROR] Error in /path.../css/style.gss[line: 1 column: 1]: Missing provide for: colors

Why do I get this error when I obviously have it written on a first line in colors.gss? I was not able to find any other documentation about @provide and @require in the GSS files.

Upvotes: 1

Views: 332

Answers (1)

ezpzlmnsqz1337
ezpzlmnsqz1337

Reputation: 424

OK guys I found the problem. I am using UiBinder in my application and I was using <ui:style src="../resources/css/style.gss">. Obviously here was the problem as it failed on the @require line because indeed there was not @provide before that.

I realized it when I found this (UiBinder Theo example).

I was using <ui:with> before (for constants), I just did not know I have to use it even for style if I want to use Theo.

Also I could read better the error log in Eclipse, It said for example: [ERROR] Line 109: Failed to resolve 'com.company.project.client.crossingstate.CrossingStateView_CrossingStateViewUiBinderImpl_GenBundle' via deferred binding (for every view basically). I could have read UiBinder from it and look for error there, it just looked like one of the errors you get when the error is at another place (like missing semicolon and 50 errors). My bad. Hope it helps somebody in the future.

Upvotes: 1

Related Questions