Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ImageRegistry problem
ImageRegistry problem [message #636928] Wed, 03 November 2010 07:52 Go to next message
Eclipse UserFriend
Hello,
I have code using ImageRegistry that works in RAP 1.3 but not 1.4.0 M2.
ImageRegistry.get(key) now always returns the latest image put in the
registry, but not the one associated with the key.
Is it a known bug?
Thanks,
Patrick
Re: ImageRegistry problem [message #636944 is a reply to message #636928] Wed, 03 November 2010 09:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi Patrick,
sounds like a bug for me. Could you provide a snippet that demonstrate the problem?
Thanks,
Ivan
Re: ImageRegistry problem [message #636952 is a reply to message #636944] Wed, 03 November 2010 10:15 Go to previous messageGo to next message
Eclipse UserFriend
Le 03/11/2010 14:37, Ivan Furnadjiev a écrit :
> Hi Patrick,
> sounds like a bug for me. Could you provide a snippet that demonstrate
> the problem?

Sure, here it is:

public void createPartControl(Composite parent) {
ImageRegistry imageRegistry = Activator.getDefault().getImageRegistry();
URL url = Activator.getDefault().getBundle().getEntry("/icons/1.gif");
imageRegistry.put("1", ImageDescriptor.createFromURL(url).createImage());
url = Activator.getDefault().getBundle().getEntry("/icons/2.gif");
imageRegistry.put("2", ImageDescriptor.createFromURL(url).createImage());
Label image = new Label(parent, SWT.NONE);
image.setImage(imageRegistry.get("1")); // displays image 2 :(
}
Re: ImageRegistry problem [message #636965 is a reply to message #636952] Wed, 03 November 2010 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi Patrick,
your snippet works fine for me against CVS HEAD. Maybe you run into this bug:
326888: InternalImageFactory uses same HashCode for different images
https://bugs.eclipse.org/bugs/show_bug.cgi?id=326888
which has been fixed in CVS HEAD and will be available in 1.4M3.
Could you provide the two images used in the snippet to double check it?
Best,
Ivan
Re: ImageRegistry problem [message #636971 is a reply to message #636965] Wed, 03 November 2010 11:34 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------070801020104040101050501
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Le 03/11/2010 16:07, Ivan Furnadjiev a écrit :
> Hi Patrick,
> your snippet works fine for me against CVS HEAD. Maybe you run into this
> bug:
> 326888: InternalImageFactory uses same HashCode for different images
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=326888
> which has been fixed in CVS HEAD and will be available in 1.4M3.
> Could you provide the two images used in the snippet to double check it?

You are right, this must be this bug, because my images only differ by
their color. I'll wait for 1.4M3. Thanks for the help.
--
Patrick


--------------070801020104040101050501
Content-Type: image/gif;
name="1.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="1.gif"

R0lGODlhEAAQAPAAAP8AAP8AACwAAAAAEAAQAEAIHQABCBxIsKDBgwgTKlzI sKHDhxAjSpxI
saLFgQEBADs=
--------------070801020104040101050501
Content-Type: image/gif;
name="2.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="2.gif"

R0lGODlhEAAQAPAAAP//AP//ACwAAAAAEAAQAEAIHQABCBxIsKDBgwgTKlzI sKHDhxAjSpxI
saLFgQEBADs=
--------------070801020104040101050501--
Previous Topic:Unresolved dependencies...
Next Topic:HttpSession issue
Goto Forum:
  


Current Time: Mon Jul 07 12:28:39 EDT 2025

Powered by FUDForum. Page generated in 0.06125 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top