Thanks Adam ... none of those seem exactly like my issue. In my case it seems to only break on the initial case ... the first time setUrl is called. After that it seems fine.
I'm doing something very similar to google maps, which potentially loads in many images at a time, and I'd like to clear out the unready images while waiting for the new ones to tile in. But as I said, it doesn't seem to work in the initial case in IE, but it seems like a solved problem as this happens in google maps. Anyway, thanks for the help. On Nov 9, 3:02 am, Adam T <[EMAIL PROTECTED]> wrote: > you might be stumbling across one of these IE issues relating to > cache: > > http://code.google.com/p/google-web-toolkit/issues/list?q=IE%20LoadLi... > > //Adam > > On 9 Nov, 08:50, rjcarr <[EMAIL PROTECTED]> wrote: > > > I have large images to display that might take some time to make their > > way to the browser. When a user requests a new image I'd like to > > display a generic "loading" image and then replace that image url with > > the correct one when loaded (note, this is using one image object). I > > have it working in Firefox and Safari, but IE never gets the alert. > > Here's the basics of the code: > > > public class SwapImage extends Image implements LoadListener { > > private String url = null; > > > public SwapImage() { > > super(BLANK_IMG_URL); > > addLoadListener(this); > > } > > > public void setUrl(String url) { > > this.url = url; > > > // first set the url to the loading image > > super.setUrl(LOADING_IMG_URL); > > } > > > public void onLoad(Widget sender) { > > if(url == null) return; // to abort on the second load alert > > > // url needs to be null before calling setUrl() > > String s = url; > > url = null; > > > // on the first load alert this url represents the img we're > > interested in > > super.setUrl(s); > > } > > > } > > > I might be able to make things work with a new Image object each time > > a new URL is needed, but I'd really like to avoid that. Is there > > anything I'm missing that would make this work in IE? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
