[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] eSWT error when obtaining system image

Based on your stack, I assume you're using plain SWT for WinCE, not eSWT (?).  Regardless, Label.setImage() should only throw this exception if the Image that's passed to it is disposed, so I would suggest verifying whether this is the case for you.  If it's not then you can post a follow-up question with this info to the SWT forum ( http://www.eclipse.org/forums/index.php?t=thread&frm_id=100 ), which is where user questions like this belong.

Grant




From:        Paul French <paul.french@xxxxxxxxxx>
To:        platform-swt-dev@xxxxxxxxxxx
Date:        08/22/2011 04:23 AM
Subject:        [platform-swt-dev] eSWT error when obtaining system image
Sent by:        platform-swt-dev-bounces@xxxxxxxxxxx




Apologies if this is the wrong place to ask this question.

The following works fine on windows.

On windows ce I get

Exception in thread "main" java.lang.IllegalArgumentException: Argument not valid
                at org.eclipse.swt.SWT.error(Unknown Source)
                at org.eclipse.swt.SWT.error(Unknown Source)
                at org.eclipse.swt.SWT.error(Unknown Source)
                at org.eclipse.swt.widgets.Widget.error(Unknown Source)
                at org.eclipse.swt.widgets.Label.setImage(Unknown Source)
       at .....

   Display display = new Display();
   Shell shell = new Shell(display);
   shell.setLayout(new FillLayout());
   Label label = new Label(shell,SWT.NONE);
   label.setImage(display.getSystemImage(SWT.ICON_WORKING));
   shell.open();
   while(!shell.isDisposed())
   {
     if (!display.readAndDispatch())
     {
       display.sleep();
     }
   }
   display.dispose();


I created this simple test case. I have loads of other eswt code that works fine on windows ce.

Any ideas?

--
Paul French
Kirona Solutions Ltd
Tel: 07803 122 058
E-Mail:
paul.french@xxxxxxxxxx
Web:
www.kirona.com

This email and any attachments are confidential and should only be read by those to whom they are addressed. If you are not the intended recipient, please contact us on 01625 585511, delete the email (including any attachment) from your computer and destroy any copies. Any distribution or copying without our prior permission is prohibited. Internet communications are not always secure and may be subject to delays, non-delivery and unauthorised alterations. Therefore, information expressed in this message is not given or endorsed by Kirona Solutions Limited ("Kirona") unless otherwise notified by our duly authorised representative independent of this message. No warranty is given that this email (including any attachment) is virus free. Any views or opinions presented are solely those of the author and do not necessarily represent those of Kirona.

Registered addresses: Kirona Solutions Limited, Barrington House, Heyes Lane, Alderley Edge, Cheshire. SK9 7LA Registered in England and Wales No: 04678711
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev