-
18 Jan 2012 12:41 PM #1
Compile error: Rebind result '...TreeAppearance' must be a class
Compile error: Rebind result '...TreeAppearance' must be a class
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?
-
27 Sep 2012 7:02 AM #2
-
27 Sep 2012 8:12 AM #3
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.
-
27 Sep 2012 11:11 PM #4
Thanks for the reply
Thanks for the reply
After I wrote my posting I finally had an idea. To cut a long story short...
I had created a Resource-Interface like this:
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:Code:public interface ClearTableFrameResources extends ClientBundle { ClearTableFrame.ClearTableFrameStyle style(); }
And now it worked!Code:public interface ClearTableFrameResources extends ClientBundle { @ClientBundle.Source({"ClearTableFrameBase.css", "ClearTableFrame.css"}) ClearTableFrame.ClearTableFrameStyle style(); }
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.
-
2 Oct 2012 11:31 AM #5
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):
If compiling, the log would be slightly different:Code:[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{}
Code:[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
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote