Tuesday, April 30, 2013

Re: Image widget not attached?

I don't think I've tried gwt-Image, but I have used <ui:image> and an @sprite in CSS. See https://code.google.com/p/google-web-toolkit/source/browse/releases/2.5/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml and other files in sample/Mail

On Tuesday, April 30, 2013 6:02:03 AM UTC-4, brec wrote:
UiBinder template extract:
         <div ui:field='myView' style='position:absolute; top:0; bot:0; left:0; right:0;' class='{style.hidden}'>
             <g:Image ui:field="myImage"/>
             <g:Button ui:field='closeButton' addStyleNames='{style.close-button}'>
                 <ui:text from='{strings.close}'/>
             </g:Button>
         </div>

The div's container is the HTMLPanel at the root of the template.

    @UiField Image      myImage;
    ...
    myImage.setUrlAndVisibleRect(url, 0, 0, width, height);

By debugger inspection I see that at the point at which setUrl... is to be called, the Image has attached: false. What am I overlooking? (This is my first use of gwt-Image.)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment