SWT and shell.setImage() under Win98 [message #460358] |
Wed, 24 August 2005 07:17  |
Eclipse User |
|
|
|
Originally posted by: ts.lkv-sh.de
We're developing under Linux and under this OS (and under XP) the
SWT-Programs runs fine.
Sometimes we need to execute the same source under Win98SE and we've the
problem that we got a "no more handles"-error of the internal SWT-Classes:
...
> final Image image2 = new Image(shell.getDisplay(),
> SWTTest.class.getResourceAsStream("lkv.gif"));
>
> // this instruction produces the error!
> shell.setImage(image2);
> ^----------------------
...
>>C:\TMP>java SWTTest
>>Exception in thread "main" org.eclipse.swt.SWTError: No more handles
>> at org.eclipse.swt.SWT.error(SWT.java:2968)
>> at org.eclipse.swt.SWT.error(SWT.java:2865)
>> at org.eclipse.swt.SWT.error(SWT.java:2836)
>> at org.eclipse.swt.graphics.Image.init(Image.java:1777)
>> at org.eclipse.swt.graphics.Image.init(Image.java:1875)
>> at org.eclipse.swt.graphics.Image.<init>(Image.java:596)
>> at
org.eclipse.swt.widgets.Decorations.createIcon(Decorations.j ava:371)
>> at
org.eclipse.swt.widgets.Decorations.setImages(Decorations.ja va:975)
>> at org.eclipse.swt.widgets.Decorations.setImage(Decorations.jav a:930)
>> at SWTTest.main(SWTTest.java:37)
After a close look at the SWT-Docs and after Googling we decide to contact
this forum. Hoping, that there is a solution!
Much thanks,
T.Schmidt, Germany.
|
|
|
|
|
|
|
|
Re: SWT and shell.setImage() under Win98 [message #460446 is a reply to message #460441] |
Fri, 26 August 2005 11:59  |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:denc9b$dht$1@news.eclipse.org...
> Does a simple, stand alone SWT program that creates exactly one shell and
> one image fail? If so, please enter a bug report with the test code.
> Thanks.
>
> "Torsten Schmidt" <ts@lkv-sh.de> wrote in message
> news:bf9d7994ad4f906511e64826dcf1edaa$1@www.eclipse.org...
>>
>> Much thanks for your answer!
>>
>> The SWT-Version is actual (V.3.1 from February'05).
>>
>> The image-resource is as necessary also later disposed. Furthermore we
>> also tried it with png and ico-Images, the problem reoccurs.
>>
>> The problem isn't depending on the amount of allocated (image-)resources.
>> It occurs at _any_, also on the first(!), setImage()-Instruction?!
>>
My $0.02: I have used Shell setImage() on Win 98, Win ME, Win NT, Win 2K and
Win XP without any problems.
---
Sunil
|
|
|
Powered by
FUDForum. Page generated in 0.05832 seconds