Results 1 to 4 of 4

Thread: Problems Using Custom Theme

  1. #1
    Sencha Premium User
    Join Date
    Jun 2011
    Posts
    76

    Default Problems Using Custom Theme

    I've followed the steps to modify and build a theme based on Triton but am getting compilation issues. I suspect I've done something wrong so any pointers would be much appreciated.

    I've unzipped the Triton theme jar and edited the triton.theme file to make a few simple colour changes for testing. I set the basePackage to "com.jbex.gxt.theme.emanaged" and set the name to "emanaged"

    I run the theme builder bat file and it generates my jar file. I copy the jar to the lib folder of my IntelliJ project and add the library to the classpath.

    I modify my gwt.xml file to include the following and remove the original triton reference -

    <inherits name='com.jbex.gxt.theme.emanaged.Theme' />I also comment out the <set-property name="gxt.theme" reference - although I'm not quite sure what this is for(?)

    When I compile I get a lot of errors along the lines of "No source code is available for type com.sencha.gxt.theme.triton.client.base.tabs.Css3PlainTabPanelAppearance;" See attached - thanks
    Attached Images Attached Images

  2. #2
    Sencha Premium User
    Join Date
    Jun 2011
    Posts
    76

    Default

    Just remembered something...

    I created some custom appearance stuff some time back (so far back I'd forgotten all about it), and this appears to relate to those changes.

    I appearance class I created was to change the appearance of tabs, but I'm getting issues related to the Css3PlainTabPanelAppearance as shown in the attached. I'm not sure how to resolve the missing import, so any pointers as to what I might need to include or change would be a big help - thanks.
    Attached Images Attached Images

  3. #3
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,178

    Default

    No source code available means the source code is not on the classpath. It takes two settings to make sure this occurs.

    1. Add the jar to the build classpath, or developer classpath.
    2. Add the source to the classpath by declaring 'inherits' for the theme it in the project.gwt.xml. This will add the source to for the GWT compiler classpath.
    - Example: <inherits name="com.sencha.gxt.theme.neptune.Theme" />

    I've often found I path to the theme incorrectly. The themebuilder should be outputting the inherits at the end of the build. I've also noticed I've forgotten to add it to the build classpath.

    Would that help?

    This may be of interest too:
    https://github.com/sencha/gxt-demo-p.../gxt-theme-40x - project with theme. It uses maven has a plugin that does the work for you
    https://github.com/sencha/gxt-archet.../gxt-theme-40x - archetype template for a module with theme

  4. #4
    Sencha Premium User
    Join Date
    Jun 2011
    Posts
    76

    Default

    The problem seems to be that the generated theme jar doesn't contain the class files - I think that's why those imports are failing. If I extract the Triton theme and rebuild a jar from that, the resulting file is much smaller than the original Triton theme jar - iwould have expeced them (but I may be incorrect) to be around the sames size.

    The only way I can get it my appearance code above to work is to leave the existing Triton <inherits> in place and add my own below it, as they appear to cascade. I would have expected to be able to include just my own theme jar and reference that for the imports - but that is failing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •