All,

Ok, having extended BlueWindowAppearance successfully, I decided to play around with Menu and, as a result, found myself wanting to change how the SeparatorMenuItem looks.

So I created MySeparatorMenuItem.css, which is SeparatorMenuItem.css with one line changed, but I also wanted to keep the definition of BlueSeparatorMenuItem.css. I also put in the appropriate replace-with clause that is as follows:
HTML Code:
  <replace-with class="com.joev.senchaexperiments.client.MySeparatorMenuItemAppearance">
    <when-type-assignable class="com.sencha.gxt.widget.core.client.menu.SeparatorMenuItem.SeparatorMenuItemAppearance" />
  </replace-with>
(by the way, my .css files and my java classes, are, for now, all in the same package/directory)

Therefore, when I created MySeparatorMenuItemAppearance.java, it was as follows:
PHP Code:
package com.joev.senchaexperiments.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.sencha.gxt.theme.blue.client.menu.BlueSeparatorMenuItemAppearance;

public class 
MySeparatorMenuItemAppearance extends BlueSeparatorMenuItemAppearance {

  public interface 
MySeparatorMenuItemResources extends ClientBundleBlueSeparatorMenuItemResources {

    @
Source({"com/sencha/gxt/theme/base/client/menu/SeparatorMenuItem.css",
             
"/com/sencha/gxt/theme/blue/client/menu/BlueSeparatorMenuItem.css",
             
"MySeparatorMenuItem.css"})
    
MySeparatorMenuItemStyle style();
  }

  public interface 
MySeparatorMenuItemStyle extends BlueSeparatorMenuItemStyle {
  }

  public 
MySeparatorMenuItemAppearance() {
    
this(GWT.<MySeparatorMenuItemResourcescreate(MySeparatorMenuItemResources.class), GWT
        
.<SeparatorMenuItemTemplatecreate(SeparatorMenuItemTemplate.class));
  }

  public 
MySeparatorMenuItemAppearance(MySeparatorMenuItemResources resourcesSeparatorMenuItemTemplate template) {
    
super(resourcestemplate);
  }

Now, look at the three files referenced in the Source annotation.

I don't actually want the first one, I just used that for testing purposes.

The second one causes a problem. If I eliminate it, everything works. But really, I only want the second and third ones, and not the first one. However, the second one, referring to BlueSeparatorMenuItemAppearance.css causes exceptions to be thrown.

Why?

Here's the exception message:
Code:
14:04:57.717 [ERROR] [senchaexperiments] Failed to create an instance of 'com.sencha.gxt.widget.core.client.menu.SeparatorMenuItem$SeparatorMenuItemAppearance' via deferred binding 

java.lang.RuntimeException: Deferred binding failed for 'com.joev.senchaexperiments.client.MySeparatorMenuItemAppearance$MySeparatorMenuItemResources' (did you forget to inherit a required module?)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
    at com.google.gwt.core.client.GWT.create(GWT.java:97)
    at com.joev.senchaexperiments.client.MySeparatorMenuItemAppearance.<init>(MySeparatorMenuItemAppearance.java:20)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.client.GWT.create(GWT.java:97)
    at com.sencha.gxt.widget.core.client.menu.SeparatorMenuItem.<init>(SeparatorMenuItem.java:30)
    at com.joev.senchaexperiments.client.menus.FileMenuBarItemBuilder.getMenuBarItem(FileMenuBarItemBuilder.java:25)
    at com.joev.senchaexperiments.client.menus.MenuBarBuilder.constructMenuBar(MenuBarBuilder.java:18)
    at com.joev.senchaexperiments.client.MainProgramImpl.getDesktop(MainProgramImpl.java:26)
    at com.joev.senchaexperiments.client.MainProgramImpl.showScreen(MainProgramImpl.java:18)
    at com.joev.senchaexperiments.client.SenchaExperiments.goToWindowingSystem(SenchaExperiments.java:90)
    at com.joev.senchaexperiments.client.SenchaExperiments.onModuleLoad(SenchaExperiments.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.client.GWT.create(GWT.java:97)
    at com.joev.senchaexperiments.client.MySeparatorMenuItemAppearance.<init>(MySeparatorMenuItemAppearance.java:20)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.client.GWT.create(GWT.java:97)
    at com.sencha.gxt.widget.core.client.menu.SeparatorMenuItem.<init>(SeparatorMenuItem.java:30)
    at com.joev.senchaexperiments.client.menus.FileMenuBarItemBuilder.getMenuBarItem(FileMenuBarItemBuilder.java:25)
    at com.joev.senchaexperiments.client.menus.MenuBarBuilder.constructMenuBar(MenuBarBuilder.java:18)
    at com.joev.senchaexperiments.client.MainProgramImpl.getDesktop(MainProgramImpl.java:26)
    at com.joev.senchaexperiments.client.MainProgramImpl.showScreen(MainProgramImpl.java:18)
    at com.joev.senchaexperiments.client.SenchaExperiments.goToWindowingSystem(SenchaExperiments.java:90)
    at com.joev.senchaexperiments.client.SenchaExperiments.onModuleLoad(SenchaExperiments.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:662)
Once again thanks in advance. I want to say it's a bug, but it's such an oddball one that I am wondering if I've done something wrong....