Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Simplicity theme issue on Mac

    Hi,

    I use SmartGWT 2.4, GWT 2.2.0 and trying to make my application switched to Simplicity theme, by adding the #simple at the and of the app url.
    In my index.html file I use the following
    Code:
    <script type="text/javascript">
    var currentSkin = "EnterpriseBlue";
     if (window.location.hash){
     	if (window.location.hash == '#simple'){
     		currentSkin = "Simplicity";	
    	} 	
     }
     
    document.write("<"+"script src=app/sc/skins/" + currentSkin + "/load_skin.js?isc_version=7.1.js><"+"/script>");
    </script>
    and in my module-file I use the following rows to attach the themes

    Code:
    <inherits name='com.smartgwt.SmartGwtNoScript'/>
    	
        <script src="sc/modules/ISC_Core.js"/>
        <script src="sc/modules/ISC_Foundation.js"/>
        <script src="sc/modules/ISC_Containers.js"/>
        <script src="sc/modules/ISC_Grids.js"/>
        <script src="sc/modules/ISC_Forms.js"/>
        <script src="sc/modules/ISC_RichTextEditor.js"/>
        <script src="sc/modules/ISC_Calendar.js"/>
        <script src="sc/modules/ISC_DataBinding.js"/>	
       <script src="sc/modules/ISC_PluginBridges.js"/>
        <inherits name="com.smartclient.theme.simplicity.SimplicityResources"/>
        <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>
    It works like a charm on my Windows(XP w.SP3, jdk1.6.0_16, MyEclipse 6.0.1 GA) machine.

    But as soon as I do that on Mac with the same project (with all the same jars) I see that some images has the scr pointed not to gif-files as it should be in Simplicity but to png-files that are absent.
    For instance: /sc/skins/Simplicity/images/TreeGrid/folder_open.png
    instead of /sc/skins/Simplicity/images/TreeGrid/folder_open.gif

    Has anybody ever encountered with the same issue? Why that can happen? I saw that some times the {extension} for some image-files is added by the code in some classes but did not found that in theTreeGrid.
    Can anybody give me a direction where to find the solution?

    Thank you.

    #2
    The *NoScript inherits still inject the theme. There are *NoTheme variants as well. See the QuickStart Guide for a fuller discussion.

    Comment


      #3
      This is the SmartGwtNoScript.gwt.xml. Does it still inherit the theme?

      Code:
       
      <module>
          <inherits name='com.google.gwt.user.User'/>
          <inherits name="com.google.gwt.xml.XML"/>
          <inherits name="com.google.gwt.i18n.I18N"/>    
          <inherits name="com.google.gwt.json.JSON"/>
          <inherits name="com.google.gwt.http.HTTP"/>
          <inherits name="com.google.gwt.event.Event"/>
      
          <inherits name='com.smartclient.SmartClientNoScript'/>
      
          <entry-point class='com.smartgwt.client.SmartGwtEntryPoint'/>
          
      	<define-linker name="smartgwt" class="com.smartgwt.linker.SmartGwtLinker" />
        	<add-linker name="smartgwt" />
      </module>

      Comment


        #4
        BTW,
        the Showcase 2.4 also uses SmartGwtNoScript and SimplicityResources
        Code:
        <module rename-to="showcase">
        
            <inherits name='com.google.gwt.user.User'/>
            <inherits name="com.google.gwt.core.Core"/>
            <inherits name="com.google.gwt.user.History"/>
        
            <inherits name="com.smartgwt.SmartGwtNoScript"/>
            <inherits name="com.smartgwt.tools.SmartGwtTools"/>
            <inherits name="com.smartclient.theme.enterprise.EnterpriseResources"/>
            <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>
            <inherits name="com.smartclient.theme.graphite.GraphiteResources"/>
            <inherits name="com.smartclient.theme.simplicity.SimplicityResources"/>
        
            <entry-point class='com.smartgwt.sample.showcase.client.Showcase'/>
        ...
        and it(my application) works fine on Win but not on Mac. I still do not know why.
        Any help?

        Comment


          #5
          We have tested this out on Windows and Macs and it works fine. Try to simplify your setup to only include SimplicityResources and in your host html file write out

          Code:
          document.write("<"+"script src=app/sc/skins/Simplicity/load_skin.js?isc_version=7.1.js><"+"/script>");
          If you are still having the same problem, examine the traffic using Firefug for FF, or Safari / Chromes Inspector and the configuration problem should become more evident.

          Make sure you have cleared the browser cache as well.

          Comment

          Working...
          X