Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Broken image in RAP 1.3.0M5
Broken image in RAP 1.3.0M5 [message #519280] Mon, 08 March 2010 11:16
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 235
Registered: July 2009
Senior Member
Hi all,
I've switched from RAP 1.2.2 to RAP 1.3.0M5 and got the problem that all
registered images are broken. This worked in version 1.2.2:

(static initialize method)

IResourceManager resourceManager = ResourceManager.getInstance();
InputStream is = MapWidget.class
.getResourceAsStream("/img/north-mini.png");
resourceManager.register("img/north-mini.png", is);


In version 1.3.0M5 I only get a broken image for this. Has something
changed? Can someone tell me under which URL the image is registered?

TIA,
Ralf.
Re: Broken image in RAP 1.3.0M5 [message #519282 is a reply to message #519280] Mon, 08 March 2010 06:30 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Ralf,

In 1.3, the resources were prefixed with a folder called rwt-resources.
The "rwt-resources" prefix was introduced with this bug-fix:
281787: Bundle image resources exposed under changing context
https://bugs.eclipse.org/bugs/show_bug.cgi?id=281787

BTW, you should use IResourceManager#getLocation() to get the URL under
which the resource is available.

HTH
Rüdiger

On 08.03.2010 12:16, R. Heydenreich wrote:
> Hi all,
> I've switched from RAP 1.2.2 to RAP 1.3.0M5 and got the problem that all
> registered images are broken. This worked in version 1.2.2:
>
> (static initialize method)
>
> IResourceManager resourceManager = ResourceManager.getInstance();
> InputStream is = MapWidget.class
> .getResourceAsStream("/img/north-mini.png");
> resourceManager.register("img/north-mini.png", is);
>
>
> In version 1.3.0M5 I only get a broken image for this. Has something
> changed? Can someone tell me under which URL the image is registered?
>
> TIA,
> Ralf.
Re: Broken image in RAP 1.3.0M5 [message #519323 is a reply to message #519282] Mon, 08 March 2010 09:18 Go to previous message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 235
Registered: July 2009
Senior Member
Rüdiger Herrmann schrieb:
> Ralf,
>
> In 1.3, the resources were prefixed with a folder called rwt-resources.
> The "rwt-resources" prefix was introduced with this bug-fix:
> 281787: Bundle image resources exposed under changing context
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=281787
>
> BTW, you should use IResourceManager#getLocation() to get the URL under
> which the resource is available.
>
> HTH
> Rüdiger

Hi Rüdiger,
thanks for your fast answer which helped me a lot. Now it works :-)

>
> On 08.03.2010 12:16, R. Heydenreich wrote:
>> Hi all,
>> I've switched from RAP 1.2.2 to RAP 1.3.0M5 and got the problem that all
>> registered images are broken. This worked in version 1.2.2:
>>
>> (static initialize method)
>>
>> IResourceManager resourceManager =
>> ResourceManager.getInstance();
>> InputStream is = MapWidget.class
>> .getResourceAsStream("/img/north-mini.png");
>> resourceManager.register("img/north-mini.png", is);
>>
>>
>> In version 1.3.0M5 I only get a broken image for this. Has something
>> changed? Can someone tell me under which URL the image is registered?
>>
>> TIA,
>> Ralf.
Previous Topic:How to hide the context menu in a customized viewer?
Next Topic:Execute command Phase Listener for KeyBindings
Goto Forum:
  


Current Time: Tue Apr 23 08:35:32 GMT 2024

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

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

Back to the top