Broken image in RAP 1.3.0M5 [message #519280] |
Mon, 08 March 2010 06:16 |
Eclipse User |
|
|
|
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 01:30  |
Eclipse User |
|
|
|
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 04:18  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02788 seconds