ClientBundle, ImageResource and FIRPanel in IE 8

10 views
Skip to first unread message

Sven

unread,
Jul 4, 2010, 5:30:22 AM7/4/10
to GWT-FX
Dear group,

I used the FIRPanel example code to put smooth fade in/out effects to
the title graphics of my site. You can see the current implementation
at http://www.dotvoting.org

After discussions in another group, I've started to move my images to
a clientbundle and I adopted the FIRPanel to use ImageResource
information rather than an URL. The adopted parts are:

> public FIRPanel(ImageResource _firstImageResource, NEffect _swapApproach) {
> visImage = new Image();
> visImage.setResource( _firstImageResource ); // setResource instead of new Image(firstImageUrl);
>
> swapEffect = _swapApproach;
> swapPanel = new NEffectPanel();
> swapEffect.addEffectCompletedHandler(new EffectCompletedHandler(){
> public void onEffectCompleted(EffectCompletedEvent handler) {
> if (forward) {
> visImage.setResource(newImageResource); // setResource instead of setUrl
> forward = false;
> } else {
> forward = true;
> }
> }
> });
> [...] // untouched
> }

> public void swapImage(ImageResource _newImageResource) {
> this.newImageResource = _newImageResource; // replaced URL by ImageResource
> runEffect();
> }

This works fine using FF 3.6.4 and Safari 5. In IE 8, the image is not
shown. Also, in IE 8, on changing the image, a Javascript error is
thrown in IE. Debugging it shows that the Exception is thrown at the
line

> visImage.setResource(newImageResource); // setResource instead of setUrl

Using Image objects in combination with setResource outside of the FIR
panel perfectly works in IE 8. Also, switching IE 8 to "compatibiltiy
mode" works fine (thus, I assume that the implementation would work
with IE 7).

The only difference I see is that in my adopted version the content of
the image is set by resources not by an URL. The rest seems to be
untouched. Has anybody an explanation why using Image in NEffectPanel
seems to behave differently than using an Image outside of it?

Thanks
Sven

Sven

unread,
Jul 4, 2010, 11:13:51 AM7/4/10
to GWT-FX
Dear group,

after investigating more, it seems that the issue is not related to
the panel but in my gif image. With other images, which I created for
testing, setResources works fine. For my specific ones, for some
reason I get an Invalid Argument JavaScriptException "number:
-2147024809". As far as I understood, this issue pops up with IE when
computing dimensions, but I haven't found anything yet related to
Image and setResources in particular.

My workaround is to check the browser and to use the clientbundle
resources in all browsers but IE 8 and to use URL with IE 8. Works
fine so far.

Sven

On 4 Jul., 11:30, Sven <sven.ti...@googlemail.com> wrote:
> Dear group,
>
> I used the FIRPanel example code to put smooth fade in/out effects to
> the title graphics of my site. You can see the current implementation
> athttp://www.dotvoting.org
Reply all
Reply to author
Forward
0 new messages