On 14 Aug, 16:25, PeteUK <newbar...@gmail.com> wrote:
> Hello,
>
> I'm going through the UiBinder tutorial and am stuck in a particular
> place. This url will take you to the 
> section:http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Us...
>
> I've created the interface as mentioned in the tutorial but the word
> Sprite is unknown and being flagged by Eclipse as "Sprite cannot be
> resolved to a type":
>
> /**
>  * Resources used by the entire application.
>  */
> public interface Resources extends ClientBundle {
>   @Source("Style.css")
>   Style style();
>
>   @Source("Logo.jpg")
>   ImageResource logo();
>
>   public interface Style extends CssResource {
>     String mainBlock();
>     String nameSpan();
>     Sprite userPictureSprite();                        // <----
> Problem here
>   }
>
> }
>
> Please can someone tell me what's wrong?
>

After quite a while reading up about UiBinder and ClientBundle,
ImageResource, CssResource, etc. from this page:
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html
(cunningly placed under "Optimize" in the Learn More index), I managed
to figure it out.

The UiBinder tutorial is wrong and Sprite should read String. The
String is the GWT-generated obfuscated name for a CSS class rule such
as this:

@sprite .userPictureSprite {
        gwt-image: "logo";
}

This GWT stuff is really nice but there's quite a steep learning
curve. The tutorials are good but could be improved. The StockWatcher
tutorial is really detailed and hooks you in. Then you learn about
this fairly new UiBinder and something about CssResource,
ImageResource, ClientBundle, etc, etc. It can be easy for a newbie to
get a bit lost at this stage.

Thanks,

Pete

-- 
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.

Reply via email to