Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWTError inserting an element in the toolbar
SWTError inserting an element in the toolbar [message #454903] Mon, 02 May 2005 10:18 Go to next message
Eclipse UserFriend
Hi,
We have a RCP Application that is creating a tree in a view. After a
long startup process, we create the tree control and we try to insert some
elements.
In some cases (we are not able to reproduce always), the insert
process throws an SWTError:


org.eclipse.swt.SWTError: Item not added

at org.eclipse.swt.SWT.error(SWT.java:2717)

at org.eclipse.swt.SWT.error(SWT.java:2616)

at org.eclipse.swt.SWT.error(SWT.java:2587)

at org.eclipse.swt.widgets.Widget.error(Widget.java:381)

at org.eclipse.swt.widgets.Tree.createItem(Tree.java:285)

at org.eclipse.swt.widgets.TreeItem.<init>(TreeItem.java:77)

We have checked the source code of the Tree.createItem method:

if (OS.SendMessage (handle, OS.TB_INSERTBUTTON, index, lpButton) == 0) {
error (SWT.ERROR_ITEM_NOT_ADDED);
}

Looking the Windows API, it explains that when it can not insert the
element, the TB_INSERTBUTTON message process return 0. But it doesn't
explain in which conditions it can not insert the element. We have tried to
use the OS.GetLastError() method but always return 0;

Why it can not insert the element? There is a tool, or a API to find the
windows error?
Can somebody help us?

Thank you in advance
Re: SWTError inserting an element in the toolbar [message #454919 is a reply to message #454903] Mon, 02 May 2005 14:14 Go to previous message
Eclipse UserFriend
It sounds like you are leaking and Windows is running out of resources. Can
you recreate the error after commenting sections of your code? If you don't
create the tree, does the problem go away?

"Pepe" <jafloresg@es.ibm.com> wrote in message
news:d55d4n$ro0$1@news.eclipse.org...
> Hi,
> We have a RCP Application that is creating a tree in a view. After
a
> long startup process, we create the tree control and we try to insert some
> elements.
> In some cases (we are not able to reproduce always), the insert
> process throws an SWTError:
>
>
> org.eclipse.swt.SWTError: Item not added
>
> at org.eclipse.swt.SWT.error(SWT.java:2717)
>
> at org.eclipse.swt.SWT.error(SWT.java:2616)
>
> at org.eclipse.swt.SWT.error(SWT.java:2587)
>
> at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
>
> at org.eclipse.swt.widgets.Tree.createItem(Tree.java:285)
>
> at org.eclipse.swt.widgets.TreeItem.<init>(TreeItem.java:77)
>
> We have checked the source code of the Tree.createItem method:
>
> if (OS.SendMessage (handle, OS.TB_INSERTBUTTON, index, lpButton) == 0) {
> error (SWT.ERROR_ITEM_NOT_ADDED);
> }
>
> Looking the Windows API, it explains that when it can not insert the
> element, the TB_INSERTBUTTON message process return 0. But it doesn't
> explain in which conditions it can not insert the element. We have tried
to
> use the OS.GetLastError() method but always return 0;
>
> Why it can not insert the element? There is a tool, or a API to find the
> windows error?
> Can somebody help us?
>
> Thank you in advance
>
>
Previous Topic:Creating 1-bit and 8-bit images for fast display
Next Topic:Modal Dialog Box
Goto Forum:
  


Current Time: Fri Nov 07 14:36:48 EST 2025

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

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

Back to the top