PDA

View Full Version : [CLOSED] Compile error: Rebind result '...TreeAppearance' must be a class



zmonster
18 Jan 2012, 12:41 PM
I am getting a bunch of GWT compiler errors of the form:

Rebind result 'com.sencha.gxt.cell.core.client.ButtonCell.ButtonCellAppearance' must be a class

(and also for TreeAppearance, etc).

This leads me to believe there is no rebind rule taking effect for a bunch of GXT 'appearance' classes.

Does this simply mean I need to inherit one of the Sencha GWT themes (blue or gray) in my module file?

amayr
27 Sep 2012, 7:02 AM
I am getting a bunch of GWT compiler errors of the form:

Rebind result 'com.sencha.gxt.cell.core.client.ButtonCell.ButtonCellAppearance' must be a class

(and also for TreeAppearance, etc).

This leads me to believe there is no rebind rule taking effect for a bunch of GXT 'appearance' classes.

Does this simply mean I need to inherit one of the Sencha GWT themes (blue or gray) in my module file?

Did you find any solution for the problem? I'm facing the exact same error.

Colin Alworth
27 Sep 2012, 8:12 AM
What do you have in your module file? Are there other errors? This typically happens either because of missing entries in the module file, or because of earlier errors in the log. Seeing both will make it easier to tell what might be wrong in your project, or if there is a bug in GXT that we can fix.

amayr
27 Sep 2012, 11:11 PM
After I wrote my posting I finally had an idea. To cut a long story short...

I had created a Resource-Interface like this:



public interface ClearTableFrameResources extends ClientBundle {
ClearTableFrame.ClearTableFrameStyle style();
}


I couldn't tell from the error message what was wrong here. Why is there no class file? Ok it's an interface, but all the other appearance classes are also using interfaces. So that couldn't be the problem. My guess: Obviously a class file is created from the according CSS-file. Wait. Where is my CSS-File-Annotation? So I added this interface method annotation:



public interface ClearTableFrameResources extends ClientBundle {
@ClientBundle.Source({"ClearTableFrameBase.css", "ClearTableFrame.css"})
ClearTableFrame.ClearTableFrameStyle style();
}


And now it worked!
I don't know in detail, how the whole compiling thing works in GWT/GXT. But the error message is really not helpful. Although it seems it tells us that a Java-class is created from the CSS-Files...? I have to take a deeper look in what's happening when you compile the whole appearance stuff.

Colin Alworth
2 Oct 2012, 11:31 AM
Unfortunately, this is a GWT class that was giving you trouble, and we're somewhat limited in what we can do with it. But based on the fix that worked for you, there should have been also an error message in your Dev Mode that looked like this (but only something, because I simulated this by deleting parts of FieldLabel):


[DEBUG] [explorerGray] - Replacing CSS class names
[INFO] [explorerGray] - The following obfuscated style classes were missing from the source CSS file:
[ERROR] [explorerGray] - fieldItemLabelTop: Fix by adding .fieldItemLabelTop{}
[ERROR] [explorerGray] - fieldLabel: Fix by adding .fieldLabel{}
[ERROR] [explorerGray] - hideLabel: Fix by adding .hideLabel{}
[ERROR] [explorerGray] - fieldItem: Fix by adding .fieldItem{}
[ERROR] [explorerGray] - fieldElement: Fix by adding .fieldElement{}
[ERROR] [explorerGray] - clearLeft: Fix by adding .clearLeft{}


If compiling, the log would be slightly different:


[INFO] Computing all possible rebind results for 'com.sencha.gxt.theme.base.client.field.FieldLabelDefaultAppearance.FieldLabelResources'
[INFO] Rebinding com.sencha.gxt.theme.base.client.field.FieldLabelDefaultAppearance.FieldLabelResources
[INFO] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[INFO] Creating assignment for css()
[INFO] Replacing CSS class names
[INFO] The following obfuscated style classes were missing from the source CSS file:
[INFO] [ERROR] fieldElement: Fix by adding .fieldElement{}
[INFO] [ERROR] fieldItemLabelTop: Fix by adding .fieldItemLabelTop{}
[INFO] [ERROR] clearLeft: Fix by adding .clearLeft{}
[INFO] [ERROR] fieldLabel: Fix by adding .fieldLabel{}
[INFO] [ERROR] fieldItem: Fix by adding .fieldItem{}
[INFO] [ERROR] hideLabel: Fix by adding .hideLabel{}
[INFO] [ERROR] Generator 'com.google.gwt.resources.rebind.c