ImageResource fail in IE 8

2010-03-02 Thread RickD
I don't know that this is limited to IE 8, this is the only IE version
I tested against.

I cannot get ImageResources to work in my project on IE.  Instead of
seeing the image sprite, I am seeing the entire image file with the
multiple sprites.  Note that everything works fine on FF and Safari.

What I noticed in the DOM is quite strange; With FF and Safari, the
images are inline in the DOM via data-URI,  but on IE the images are
in the md5.cache.png files.  The problem is, on IE, the image
element styles do not contain the x/y offsets.  Note that I used
Firebug and DebugBar to ascertain this.


I created a simple/new 'ImageViewer' project and tested against that
as well,  that also did not work until I activated the 'compatibility
viewer' mode in IE.  Also, the images were not inlined.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: ImageResource fail in IE 8 (Details added)

2010-03-02 Thread RickD
Forgive me for replying to my own message, but I have more
information.

First, I have a simple project to recreate the problem.  I just create
the default 'ImageViewer' application and display four pictures.  Here
is the GUI code:

public class ImageViewer implements EntryPoint {
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();

Image image = new Image(Images.INSTANCE.picture1());
rootPanel.add(image, 25, 24);
image.setSize(100px, 100px);

Image image_1 = new Image(Images.INSTANCE.picture2());
rootPanel.add(image_1, 310, 38);
image_1.setSize(100px, 100px);

Image image_2 = new Image(Images.INSTANCE.picture3());
rootPanel.add(image_2, 25, 168);
image_2.setSize(100px, 100px);

Image image_3 = new Image(Images.INSTANCE.picture4());
rootPanel.add(image_3, 310, 168);
image_3.setSize(100px, 100px);
}
}

public interface Images extends ClientBundle {

public static final Images INSTANCE = GWT.create(Images.class);

ImageResource picture1();

ImageResource picture2();

ImageResource picture3();

ImageResource picture4);

}

The pictures are just small 'png' images, all the same size.

When running in compatibility view mode, the images are not inlined,
but are sprited in the usual manner (x/y style offsets into the
md5.cache.png file).  When not in compatibility view mode, the
images are evidently supposed to be inlined but are not.  Here is the
IE IMG element

IMG style=POSITION: absolute; WIDTH: 100px; HEIGHT: 100px; TOP:
24px; LEFT: 25px class=gwt-Image border=0 src=http://10.99.41.45/war/
com.mycompany.project.ImageViewer/clear.cache.gif
__eventBits=163965

Whereas, here is the image element on FF (image base64 data snipped):

img border=0 style=width: 100px; height: 100px; background:
url(quot;data:image/png;base64,iVB [snip]  ggg==quot;) no-repeat
scroll 0px 0px transparent; position: absolute; left: 25px; top:
168px; src=http://10.99.41.45/war/com.mycompany.project.ImageViewer/
clear.cache.gif class=gwt-Image

On Mar 2, 1:53 pm, RickD soulda...@gmail.com wrote:
 I don't know that this is limited to IE 8, this is the only IE version
 I tested against.

 I cannot get ImageResources to work in my project on IE.  Instead of
 seeing the image sprite, I am seeing the entire image file with the
 multiple sprites.  Note that everything works fine on FF and Safari.

 What I noticed in the DOM is quite strange; With FF and Safari, the
 images are inline in the DOM via data-URI,  but on IE the images are
 in the md5.cache.png files.  The problem is, on IE, the image
 element styles do not contain the x/y offsets.  Note that I used
 Firebug and DebugBar to ascertain this.

 I created a simple/new 'ImageViewer' project and tested against that
 as well,  that also did not work until I activated the 'compatibility
 viewer' mode in IE.  Also, the images were not inlined.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: ClientBundle compilation error

2010-02-09 Thread RickD
I too am experiencing this exact problem.  I have successfully used
ImageResources for nearly all of my images, but when I added just one
more image it breaks!?  The problem seems to be related to the number
of images and not the content of the image.

I am anxiously awaiting a fix, and in the meantime a work-around.

Ciao,

Rick


On Jan 17, 10:11 am, Arunava r.arun...@gmail.com wrote:
 I am getting an error while using ClientBundle in my project. I have
 used Eclipse to generate the ClientBundle. Also added the following
 line in Resource interface -

 1. public static final Resources INSTANCE =  GWT.create
 (Resources.class);

 The code that uses ClientBundle -

 2. this.add(new Image(Resources.INSTANCE.header_bg_right()));

 3. The exception is -

 Compiling module org.eagle.insight.EGLInsight
    [ERROR] Errors in 'file:/C:/MyProject/EGLInsight/src/org/eagle/
 insight/client/Resources.java'
       [ERROR]  Internal compiler error
 java.lang.NullPointerException
         at com.google.gwt.dev.javac.CompiledClass.init(CompiledClass.java:
 83)
         at com.google.gwt.dev.javac.JdtCompiler$FindTypesInCud.visit
 (JdtCompiler.java:203)
         at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse
 (TypeDeclaration.java:1198)
         at
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse
 (CompilationUnitDeclaration.java:687)
         at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process
 (JdtCompiler.java:157)
         at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
 444)
         at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
 466)
         at com.google.gwt.dev.javac.CompilationStateBuilder
 $CompileMoreLater.compile(CompilationStateBuilder.java:141)
         at
 com.google.gwt.dev.javac.CompilationStateBuilder.doBuildGeneratedTypes
 (CompilationStateBuilder.java:325)
         at com.google.gwt.dev.javac.CompilationStateBuilder
 $CompileMoreLater.addGeneratedTypes(CompilationStateBuilder.java:126)
         at
 com.google.gwt.dev.javac.CompilationState.addGeneratedCompilationUnits
 (CompilationState.java:86)
         at com.google.gwt.dev.javac.StandardGeneratorContext.finish
 (StandardGeneratorContext.java:348)
         at
 com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRe 
 binds
 (WebModeCompilerFrontEnd.java:129)
         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
 $CompilerImpl.process(AbstractCompiler.java:200)
         at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
 444)
         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
 $CompilerImpl.compile(AbstractCompiler.java:123)
         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
 $CompilerImpl.compile(AbstractCompiler.java:234)
         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access
 $200(AbstractCompiler.java:109)
         at com.google.gwt.dev.jdt.AbstractCompiler.compile
 (AbstractCompiler.java:522)
         at
 com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations
 (BasicWebModeCompiler.java:112)
         at
 com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclaratio ns
 (WebModeCompilerFrontEnd.java:47)
         at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile
 (JavaToJavaScriptCompiler.java:421)
         at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile
 (JavaScriptCompiler.java:32)
         at com.google.gwt.dev.Precompile.precompile(Precompile.java:522)
         at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
         at com.google.gwt.dev.Compiler.run(Compiler.java:201)
         at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
         at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
 87)
         at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
 (CompileTaskRunner.java:81)
         at com.google.gwt.dev.Compiler.main(Compiler.java:159)

 [ERROR] Unexpected
 java.lang.NullPointerException
         at com.google.gwt.dev.javac.CompiledClass.init(CompiledClass.java:
 83)
         at com.google.gwt.dev.javac.JdtCompiler$FindTypesInCud.visit
 (JdtCompiler.java:203)
         at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse
 (TypeDeclaration.java:1198)
         at
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse
 (CompilationUnitDeclaration.java:687)
         at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process
 (JdtCompiler.java:157)
         at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
 444)
         at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
 466)
         at com.google.gwt.dev.javac.CompilationStateBuilder
 $CompileMoreLater.compile(CompilationStateBuilder.java:141)
         at
 com.google.gwt.dev.javac.CompilationStateBuilder.doBuildGeneratedTypes
 (CompilationStateBuilder.java:325)
         at com.google.gwt.dev.javac.CompilationStateBuilder